From 63c223b9e1e329aa4c6d7c2d76c7474d23a89fbf Mon Sep 17 00:00:00 2001 From: hawk Date: Tue, 22 Mar 2011 13:28:52 +0000 Subject: [PATCH] - use pidfile for killproc and status Changed files: c-icap.init -> 1.2 --- c-icap.init | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/c-icap.init b/c-icap.init index 2b490d3..5ea4b3e 100644 --- a/c-icap.init +++ b/c-icap.init @@ -8,7 +8,7 @@ # description: c-icap ICAP server # # processname: c-icap -# pidfile: /var/run/c-icap.pid +# pidfile: /var/run/c-icap/c-icap.pid # config: /etc/c-icap/c-icap.conf # Source function library @@ -20,6 +20,9 @@ # Get service config [ -f /etc/sysconfig/c-icap ] && . /etc/sysconfig/c-icap +# Default pidfile location +c_icap_pidfile="/var/run/c-icap/c-icap.pid" + # Check that networking is up. if is_yes "${NETWORKING}"; then if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then @@ -46,7 +49,7 @@ stop() { if [ -f /var/lock/subsys/c-icap ]; then # Stop daemons. msg_stopping c-icap - killproc c-icap + killproc --pidfile $c_icap_pidfile c-icap rm -f /var/lock/subsys/c-icap >/dev/null 2>&1 else msg_not_running c-icap @@ -97,7 +100,7 @@ case "$1" in reload ;; status) - status c-icap + status --pidfile $c_icap_pidfile c-icap exit $? ;; *) -- 2.43.0