diff --git a/appmgr/src/tor.rs b/appmgr/src/tor.rs index cdc61d30e..1ea2f225b 100644 --- a/appmgr/src/tor.rs +++ b/appmgr/src/tor.rs @@ -299,7 +299,7 @@ pub async fn write_lan_services(hidden_services: &ServicesMap) -> Result<(), Err .arg(&req_path) .arg("-out") .arg(&cert_path) - .invoke("OpenSSL GenKey") + .invoke("OpenSSL CA") .await?; } let fullchain_path = base_path.join("cert-local.fullchain.crt.pem"); diff --git a/appmgr/src/version/v0_2_9.rs b/appmgr/src/version/v0_2_9.rs index 2c836de5e..d02feaf01 100644 --- a/appmgr/src/version/v0_2_9.rs +++ b/appmgr/src/version/v0_2_9.rs @@ -46,8 +46,18 @@ impl VersionT for Version { Ok(()) } async fn down(&self) -> Result<(), Error> { - tokio::fs::remove_file("/etc/nginx/sites-enabled/start9-services.conf").await?; - tokio::fs::remove_file(crate::tor::ETC_NGINX_SERVICES_CONF).await?; + tokio::fs::remove_file("/etc/nginx/sites-enabled/start9-services.conf") + .await + .or_else(|e| match e { + e if e.kind() == std::io::ErrorKind::NotFound => Ok(()), + e => Err(e), + })?; + tokio::fs::remove_file(crate::tor::ETC_NGINX_SERVICES_CONF) + .await + .or_else(|e| match e { + e if e.kind() == std::io::ErrorKind::NotFound => Ok(()), + e => Err(e), + })?; let svc_exit = std::process::Command::new("service") .args(&["nginx", "reload"]) .status()?;