From e6c016db9328e9c17ab68fb8142e5ca017fa99ce Mon Sep 17 00:00:00 2001 From: fbt Date: Mon, 30 Nov 2026 00:12:19 +0000 Subject: [PATCH] Nevermind, I remember now why this was all one function Signed-off-by: fbt --- ssm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ssm b/ssm index 282c173..3f5b9d0 100755 --- a/ssm +++ b/ssm @@ -165,6 +165,9 @@ svc() { job_exit = 0 # Exit successfully by default svc::cleanup() { + nullexec "${service_stop_command[@]}" + anywait "$job_pid" "$service_stop_timeout" + # Cgroup stuff, experimental and pretty much deprecated. if cgroups; then if service_cgroup_cleanup; then @@ -193,13 +196,7 @@ svc() { # Die die "$job_exit" - }; trap 'svc::cleanup' EXIT - - svc::stop_job() { - nullexec "${service_stop_command[@]}" - - anywait "$job_pid" "$service_stop_timeout" - }; trap 'svc::stop_job' TERM + }; trap 'svc::cleanup' TERM EXIT printf '%s' "$BASHPID" > "$svc_pidfile"