Nevermind, I remember now why this was all one function

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-30 00:12:19 +00:00
parent 4a3b255932
commit e6c016db93
+4 -7
View File
@@ -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"