diff options
author | 2012-08-23 21:27:08 +0000 | |
---|---|---|
committer | 2012-08-23 21:27:08 +0000 | |
commit | b562bfcc80663f61bde0a0f83a90b0303ebb27f5 (patch) | |
tree | de32c1d7884f1a68658f3e7e8a5ad5255069ca24 /net-analyzer/nsca/files/nsca-nagios3 | |
parent | Move nagios-nsca to just nsca. (diff) | |
download | gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.tar.gz gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.tar.bz2 gentoo-2-b562bfcc80663f61bde0a0f83a90b0303ebb27f5.zip |
Move from net-analyzer/nagios-nsca to net-analyzer/nsca, as the package work with Icinga just fine.
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'net-analyzer/nsca/files/nsca-nagios3')
-rw-r--r-- | net-analyzer/nsca/files/nsca-nagios3 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net-analyzer/nsca/files/nsca-nagios3 b/net-analyzer/nsca/files/nsca-nagios3 new file mode 100644 index 000000000000..bef0cb7db976 --- /dev/null +++ b/net-analyzer/nsca/files/nsca-nagios3 @@ -0,0 +1,36 @@ +#!/sbin/runscript + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting nsca" + start-stop-daemon --start --quiet --name nsca \ + --startas /usr/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" +} |