diff options
author | Lance Albertson <ramereth@gentoo.org> | 2006-07-04 20:15:51 +0000 |
---|---|---|
committer | Lance Albertson <ramereth@gentoo.org> | 2006-07-04 20:15:51 +0000 |
commit | 5f821ca1dacf233d1fa06a79244b32cc449f90a7 (patch) | |
tree | a1bfed4408a39435f45ef8791ba971104d577d61 /net-analyzer/nagios-nrpe | |
parent | * bug #132109 fixed (diff) | |
download | gentoo-2-5f821ca1dacf233d1fa06a79244b32cc449f90a7.tar.gz gentoo-2-5f821ca1dacf233d1fa06a79244b32cc449f90a7.tar.bz2 gentoo-2-5f821ca1dacf233d1fa06a79244b32cc449f90a7.zip |
add init script I forgot
(Portage version: 2.1-r1)
Diffstat (limited to 'net-analyzer/nagios-nrpe')
-rw-r--r-- | net-analyzer/nagios-nrpe/ChangeLog | 5 | ||||
-rw-r--r-- | net-analyzer/nagios-nrpe/files/nrpe-2.5.2 | 36 |
2 files changed, 40 insertions, 1 deletions
diff --git a/net-analyzer/nagios-nrpe/ChangeLog b/net-analyzer/nagios-nrpe/ChangeLog index 42e1010bf4db..4afee350d2be 100644 --- a/net-analyzer/nagios-nrpe/ChangeLog +++ b/net-analyzer/nagios-nrpe/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for net-analyzer/nagios-nrpe # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-nrpe/ChangeLog,v 1.30 2006/07/04 20:01:23 ramereth Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-nrpe/ChangeLog,v 1.31 2006/07/04 20:15:51 ramereth Exp $ + + 04 Jul 2006; Lance Albertson <ramereth@gentoo.org> +files/nrpe-2.5.2: + * Add init script (forgot it before!) *nagios-nrpe-2.5.2 (04 Jul 2006) diff --git a/net-analyzer/nagios-nrpe/files/nrpe-2.5.2 b/net-analyzer/nagios-nrpe/files/nrpe-2.5.2 new file mode 100644 index 000000000000..768d860a7b17 --- /dev/null +++ b/net-analyzer/nagios-nrpe/files/nrpe-2.5.2 @@ -0,0 +1,36 @@ +#!/sbin/runscript + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting nrpe" + start-stop-daemon --start --quiet --name nrpe \ + --startas /usr/nagios/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" +} |