From: Marcin Krol Date: Tue, 21 May 2024 18:49:01 +0000 (+0200) Subject: - PLD merge: don't delete base pidfile if other pid file was specified X-Git-Tag: 0.5.4~7 X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=20920d818d785137888facc07b84771ded2a70c2;p=rc-scripts.git - PLD merge: don't delete base pidfile if other pid file was specified --- diff --git a/lib/functions b/lib/functions index 25803f6..b4c4840 100644 --- a/lib/functions +++ b/lib/functions @@ -896,7 +896,11 @@ killproc() { # Remove pid file if any. if [ "$notset" = "1" ]; then - rm -f /var/run/${base}.pid + if [ -f "${pidfile}" ] ; then + rm -f "$pidfile" + else + rm -f /var/run/${base}.pid + fi fi return $result