]> TLD Linux GIT Repositories - rc-scripts.git/commitdiff
- PLD merge: don't delete base pidfile if other pid file was specified
authorMarcin Krol <hawk@tld-linux.org>
Tue, 21 May 2024 18:49:01 +0000 (20:49 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 21 May 2024 18:49:01 +0000 (20:49 +0200)
lib/functions

index 25803f6557872a00e4f4d30de2f2228a28760150..b4c4840aa6dce182ea5b226d74cb07eb01cdb94a 100644 (file)
@@ -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