Appmgr/bugfix/nginx file too large migrations (#258)

* Nginx: allow infinite body sizes

* add nginx refresh to migration script
This commit is contained in:
Chris Guida
2021-03-16 16:15:15 -06:00
committed by Keagan McClelland
parent 276085f084
commit 1c3b16e870

View File

@@ -13,6 +13,22 @@ impl VersionT for Version {
&V0_2_11
}
async fn up(&self) -> Result<(), Error> {
crate::tor::write_lan_services(
&crate::tor::services_map(&PersistencePath::from_ref(crate::SERVICES_YAML)).await?,
)
.await?;
let svc_exit = std::process::Command::new("service")
.args(&["nginx", "reload"])
.status()?;
crate::ensure_code!(
svc_exit.success(),
crate::error::GENERAL_ERROR,
"Failed to Reload Nginx: {}",
svc_exit
.code()
.or_else(|| { svc_exit.signal().map(|a| 128 + a) })
.unwrap_or(0)
);
Ok(())
}
async fn down(&self) -> Result<(), Error> {