From: Michael Tremer Date: Tue, 29 Jul 2025 14:36:54 +0000 (+0000) Subject: initscripts: Fix process check for processes with PID file X-Git-Tag: v2.29-core197~25^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8aa06d9fc3f7024611b00f00ca02ce14392d1e33;p=ipfire-2.x.git initscripts: Fix process check for processes with PID file This check tests whether a process is still alive, but it fails for those processes when we are using a PID file. Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 85eb3e975..c4b7cb39e 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -620,7 +620,11 @@ killproc() done if [ -z "${killsig}" ]; then - pidofproc -s "${1}" + if [ -z "${pidfile}" ]; then + pidofproc -s "${1}" + else + pidofproc -s -p "${pidfile}" "${1}" + fi # Program was terminated if [ "$?" != "0" ]; then