]> git.pld-linux.org Git - packages/c-icap.git/commitdiff
- use pidfile for killproc and status
authorhawk <hawk@pld-linux.org>
Tue, 22 Mar 2011 13:28:52 +0000 (13:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    c-icap.init -> 1.2

c-icap.init

index 2b490d3e34239862e05ef74d5354d82dacab56bd..5ea4b3ecd2fb58ce89d04b94b34450f4b9ad9819 100644 (file)
@@ -8,7 +8,7 @@
 # description: c-icap ICAP server
 #
 # processname: c-icap
 # 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
 # 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
 
 # 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
 # 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
        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
                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)
        reload
        ;;
   status)
-       status c-icap
+       status --pidfile $c_icap_pidfile c-icap
        exit $?
        ;;
   *)
        exit $?
        ;;
   *)
This page took 0.133919 seconds and 4 git commands to generate.