From c80f4280843dc5782b852dd620abb965b76a7aac Mon Sep 17 00:00:00 2001 From: desbma Date: Sat, 16 Dec 2023 23:04:05 +0100 Subject: [PATCH] fix: stopping some services like nginx --- src/main.rs | 1 + src/systemd/service.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index cc99af1..baab7fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,6 +65,7 @@ fn main() -> anyhow::Result<()> { // Start signal handling thread let mut signals = signal_hook::iterator::Signals::new([ signal_hook::consts::signal::SIGINT, + signal_hook::consts::signal::SIGQUIT, signal_hook::consts::signal::SIGTERM, ])?; thread::spawn(move || { diff --git a/src/systemd/service.rs b/src/systemd/service.rs index 282f688..ee344fd 100644 --- a/src/systemd/service.rs +++ b/src/systemd/service.rs @@ -88,6 +88,7 @@ impl Service { } // strace may slow down enough to risk reaching some service timeouts writeln!(fragment_file, "TimeoutStartSec=infinity")?; + writeln!(fragment_file, "KillMode=control-group")?; // Profile data dir let mut rng = rand::thread_rng();