From 1c3b16e870d531650e2bdea5634ba39d75e09456 Mon Sep 17 00:00:00 2001 From: Chris Guida Date: Tue, 16 Mar 2021 16:15:15 -0600 Subject: [PATCH] Appmgr/bugfix/nginx file too large migrations (#258) * Nginx: allow infinite body sizes * add nginx refresh to migration script --- appmgr/src/version/v0_2_11.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/appmgr/src/version/v0_2_11.rs b/appmgr/src/version/v0_2_11.rs index b6c298e68..5df25f4c0 100644 --- a/appmgr/src/version/v0_2_11.rs +++ b/appmgr/src/version/v0_2_11.rs @@ -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> {