mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
install initscript for NRPE
Install initscript for NRPE addon. The second version of this patch actually includes the initscript, which was missing due to lack of coffee the first time. :-) Thanks to Michael for catching it. Resent due to crappy linewrapping in initscript by MUA. Signed-off-by: Peter Müller <peter.mueller@link38.eu> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
d8ef6a9537
commit
a305ffea8b
38
src/initscripts/packages/nrpe
Normal file
38
src/initscripts/packages/nrpe
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/nrpe
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
NRPEBIN=/usr/bin/nrpe
|
||||
NRPECFG=/etc/nagios/nrpe.cfg
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting nrpe..."
|
||||
loadproc $NRPEBIN -c $NRPECFG -d
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping nrpe..."
|
||||
killproc $NRPEBIN
|
||||
rm -f /var/run/nrpe.pid
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc $NRPEBIN
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/nrpe
|
||||
Reference in New Issue
Block a user