blob: e1d3085cbd8b741eb8f0890c406437b3f9eef0db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/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"
}
|