[projects/rc-scripts] Don't delete base pidfile if other pid file was specified. Delete it instead. It was deleting aaa.pi
arekm
arekm at pld-linux.org
Wed Feb 6 15:45:47 CET 2019
commit 27a3470a3eca2ab9b6d5ac5b7b8c7fdb65b66435
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Feb 6 15:45:43 2019 +0100
Don't delete base pidfile if other pid file was specified. Delete it instead. It was deleting aaa.pid even if we did killproc -p bbb.pid aaa and our service name was aaa.
lib/functions | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/lib/functions b/lib/functions
index 97169811..b696738f 100644
--- a/lib/functions
+++ b/lib/functions
@@ -976,7 +976,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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/rc-scripts.git/commitdiff/27a3470a3eca2ab9b6d5ac5b7b8c7fdb65b66435
More information about the pld-cvs-commit
mailing list