1 From 27a3470a3eca2ab9b6d5ac5b7b8c7fdb65b66435 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= <arekm@maven.pl>
3 Date: Wed, 6 Feb 2019 15:45:43 +0100
4 Subject: [PATCH] Don't delete base pidfile if other pid file was specified.
5 Delete it instead. It was deleting aaa.pid even if we did killproc -p bbb.pid
6 aaa and our service name was aaa.
9 lib/functions | 6 +++++-
10 1 file changed, 5 insertions(+), 1 deletion(-)
12 diff --git a/lib/functions b/lib/functions
13 index 9716981..b696738 100644
16 @@ -976,7 +976,11 @@ killproc() {
18 # Remove pid file if any.
19 if [ "$notset" = "1" ]; then
20 - rm -f /var/run/${base}.pid
21 + if [ -f "${pidfile}" ] ; then
24 + rm -f /var/run/${base}.pid