From: | "Tobias Scherbaum (dertobi123)" <dertobi123@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-nrpe/files: nrpe-nagios3 |
Date: | Sun, 27 Apr 2008 18:19:36 |
Message-Id: | E1JqBTJ-0005HO-LZ@stork.gentoo.org |
1 | dertobi123 08/04/27 18:19:33 |
2 | |
3 | Added: nrpe-nagios3 |
4 | Log: |
5 | add initscript for nagios-3 |
6 | (Portage version: 2.1.5_rc6) |
7 | |
8 | Revision Changes Path |
9 | 1.1 net-analyzer/nagios-nrpe/files/nrpe-nagios3 |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-nrpe/files/nrpe-nagios3?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-nrpe/files/nrpe-nagios3?rev=1.1&content-type=text/plain |
13 | |
14 | Index: nrpe-nagios3 |
15 | =================================================================== |
16 | #!/sbin/runscript |
17 | |
18 | opts="${opts} reload" |
19 | |
20 | depend() { |
21 | need net |
22 | } |
23 | |
24 | start() { |
25 | ebegin "Starting nrpe" |
26 | start-stop-daemon --start --quiet --name nrpe \ |
27 | --startas /usr/bin/nrpe \ |
28 | -c nagios:nagios \ |
29 | -- -c /etc/nagios/nrpe.cfg \ |
30 | --daemon |
31 | eend $? "Failed to Start nrpe" |
32 | } |
33 | |
34 | stop() { |
35 | ebegin "Stopping nrpe" |
36 | start-stop-daemon --stop --quiet -n nrpe |
37 | eend $? "Failed to Stop nrpe" |
38 | } |
39 | |
40 | reload() { |
41 | ebegin "Reloading nrpe" |
42 | kill -HUP `pgrep nrpe | head -1` |
43 | eend $? "Failed to reload nrpe" |
44 | } |
45 | |
46 | restart() { |
47 | ebegin "Restarting nrpe" |
48 | svc_stop |
49 | svc_start |
50 | eend $? "Failed to Restart nrpe" |
51 | } |
52 | |
53 | |
54 | |
55 | -- |
56 | gentoo-commits@l.g.o mailing list |