diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-04-27 18:19:33 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-04-27 18:19:33 +0000 |
commit | b497215a3f676c4c566c23bdb4c99c7429c11ffd (patch) | |
tree | c85a68aa24e6056e58a386d789aaab6646de6cb7 /net-analyzer | |
parent | bump for nagios-3 (diff) | |
download | gentoo-2-b497215a3f676c4c566c23bdb4c99c7429c11ffd.tar.gz gentoo-2-b497215a3f676c4c566c23bdb4c99c7429c11ffd.tar.bz2 gentoo-2-b497215a3f676c4c566c23bdb4c99c7429c11ffd.zip |
add initscript for nagios-3
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/nagios-nrpe/files/nrpe-nagios3 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net-analyzer/nagios-nrpe/files/nrpe-nagios3 b/net-analyzer/nagios-nrpe/files/nrpe-nagios3 new file mode 100644 index 000000000000..d83171e22fac --- /dev/null +++ b/net-analyzer/nagios-nrpe/files/nrpe-nagios3 @@ -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/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" +} |