diff --git a/sfsmcd/src/main.rs b/sfsmcd/src/main.rs index a40f589..744e1f6 100644 --- a/sfsmcd/src/main.rs +++ b/sfsmcd/src/main.rs @@ -55,6 +55,8 @@ async fn main() -> Result<(), Box> { // Will (afaik) be stabilized in Rust 1.48 // core::future::pending::<()>().await; + + // Wait until SIGTERM (when systemd stops this service), then shutdown tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?.recv().await; info!("Got SIGTERM, shutting down"); Ok(())