]> git.pld-linux.org Git - packages/nagios-nrpe.git/blobdiff - nrpe.init
use common pidfile for status and stop
[packages/nagios-nrpe.git] / nrpe.init
index 3161c7334e4dcaae031ce86f538d90f4f855a161..4cba6ef4d13023cbd4d8203dc6a9b0172832d53a 100755 (executable)
--- a/nrpe.init
+++ b/nrpe.init
@@ -27,6 +27,8 @@ else
        exit 0
 fi
 
+pidfile=/var/run/nrpe/nrpe.pid
+
 start() {
        if [ -f /var/lock/subsys/nrpe ]; then
                msg_already_running "Nagios NRPE daemon"
@@ -46,7 +48,7 @@ stop() {
        fi
 
        msg_stopping "Nagios NRPE daemon"
-       killproc --pidfile nrpe/nrpe.pid nrpe
+       killproc --pidfile $pidfile nrpe
        rm -f /var/lock/subsys/nrpe
 }
 
@@ -80,7 +82,7 @@ case "$1" in
        condrestart 7
        ;;
   status)
-       status nrpe
+       status --pidfile $pidfile nrpe
        exit $?
        ;;
   *)
This page took 0.056556 seconds and 4 git commands to generate.