You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/nrpe/files/nrpe-nagios3

37 lines
591 B

#!/sbin/runscript
extra_started_commands="reload"
depend() {
need net
}
start() {
ebegin "Starting nrpe"
start-stop-daemon --start --quiet --name nrpe \
--exec /usr/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"
}
reload() {
ebegin "Reloading nrpe"
kill -HUP `pgrep nrpe | head -1`
eend $? "Failed to reload nrpe"
}
restart() {
ebegin "Restarting nrpe"
svc_stop
svc_start
eend $? "Failed to Restart nrpe"
}