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/nagios-nsca/files/nsca

37 lines
602 B

#!/sbin/runscript
opts="${opts} reload"
depend() {
need net
}
start() {
ebegin "Starting nsca"
start-stop-daemon --start --quiet --name nsca \
--startas /usr/nagios/bin/nsca \
-c nagios:nagios \
-- -c /etc/nagios/nsca.cfg \
--daemon
eend $? "Failed to Start nsca"
}
stop() {
ebegin "Stopping nsca"
start-stop-daemon --stop --quiet -n nsca
eend $? "Failed to Stop nsca"
}
reload() {
ebegin "Reloading nsca"
kill -HUP `pgrep nsca`
eend $? "Failed to reload nsca"
}
restart() {
ebegin "Restarting nsca"
svc_stop
svc_start
eend $? "Failed to Restart nsca"
}