X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lib%2Ffunctions;fp=lib%2Ffunctions;h=b4c4840aa6dce182ea5b226d74cb07eb01cdb94a;hb=20920d818d785137888facc07b84771ded2a70c2;hp=25803f6557872a00e4f4d30de2f2228a28760150;hpb=007473280f09c23aeba773bafc133456d11e7b2f;p=rc-scripts.git 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