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