diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/pnp4nagios/files/npcd |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/pnp4nagios/files/npcd')
-rw-r--r-- | net-analyzer/pnp4nagios/files/npcd | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net-analyzer/pnp4nagios/files/npcd b/net-analyzer/pnp4nagios/files/npcd new file mode 100644 index 000000000000..9ae67362d645 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/npcd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="${opts} reload" + +depend() { + need net +} + +start() { + ebegin "Starting npcd" + start-stop-daemon --start --exec /usr/bin/npcd \ + -- -f /etc/pnp/npcd.cfg \ + -d + eend $? "Failed to Start npcd" +} + +stop() { + ebegin "Stopping npcd" + start-stop-daemon --stop --quiet -n npcd + eend $? "Failed to Stop npcd" +} + +reload() { + ebegin "Reloading npcd" + kill -HUP `pgrep npcd` + eend $? "Failed to reload npcd" +} + +restart() { + ebegin "Restarting npcd" + svc_stop + svc_start + eend $? "Failed to Restart npcd" +} |