diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:20:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:20:09 +0000 |
commit | 018433a6da60c6395baaaa0833d5c50ac6645552 (patch) | |
tree | 2012deeff2f98b267c0c10425c1d4a054190b73f /startup/debian-init.in | |
parent | Initial commit. (diff) | |
download | nagios-nrpe-018433a6da60c6395baaaa0833d5c50ac6645552.tar.xz nagios-nrpe-018433a6da60c6395baaaa0833d5c50ac6645552.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'startup/debian-init.in')
-rw-r--r-- | startup/debian-init.in | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/startup/debian-init.in b/startup/debian-init.in new file mode 100644 index 0000000..47341a5 --- /dev/null +++ b/startup/debian-init.in @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Copyright (c) 2016 Nagios(R) Core(TM) Development Team +# +# Start/stop the nrpe daemon. + +NRPE_BIN=@sbindir@/nrpe +NRPE_CFG=@pkgsysconfdir@/nrpe.cfg +PID_FILE=@piddir@/nrpe.pid + +test -x $NRPE_BIN || exit 0 + +case "$1" in + +start) + echo -n "Starting nagios remote plugin daemon: nrpe" + start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d + echo "." + ;; + +stop) + echo -n "Stopping nagios remote plugin daemon: nrpe" + start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN + echo "." + ;; + +restart|force-reload) + echo -n "Restarting nagios remote plugin daemon: nrpe" + start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN + start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d + echo "." + ;; + +reload) + echo -n "Reloading configuration files for nagios remote plugin daemon: nrpe" + test -f $PID_FILE || exit 0 + test -x /bin/kill && /bin/kill -HUP `cat $PID_FILE` + echo "." + ;; + +*) + echo "Usage: $0 start|stop|restart|reload|force-reload" + exit 1 + ;; +esac + +exit 0 |