29 lines
462 B
Groff
29 lines
462 B
Groff
|
#!/sbin/runscript
|
||
|
|
||
|
depend() {
|
||
|
need net
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
ebegin "Starting nrpe"
|
||
|
start-stop-daemon --start --quiet --name nrpe \
|
||
|
--startas /usr/nagios/bin/nrpe \
|
||
|
-c nagios:nagios \
|
||
|
-- -c /etc/nagios/nrpe.cfg \
|
||
|
--daemon
|
||
|
eend $? "Failed to Start nrpe"
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ebegin "Stopping nrpe"
|
||
|
start-stop-daemon --stop --quiet -n nrpe
|
||
|
eend $? "Failed to Stop nrpe"
|
||
|
}
|
||
|
|
||
|
restart() {
|
||
|
ebegin "Restarting nrpe"
|
||
|
svc_stop
|
||
|
svc_start
|
||
|
eend $? "Failed to Restart nrpe"
|
||
|
}
|