You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/pnp4nagios/files/npcd

38 lines
653 B

#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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"
}