]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - net-analyzer/pnp4nagios/files/npcd
9158c18c9963a154d2a670609faa1cdcac797b35
[mjo-overlay.git] / net-analyzer / pnp4nagios / files / npcd
1 #!/sbin/runscript
2 # Copyright 1999-2010 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/pnp4nagios/files/npcd,v 1.2 2010/10/20 16:37:27 dertobi123 Exp $
5
6 opts="${opts} reload"
7
8 depend() {
9 need net
10 }
11
12 start() {
13 ebegin "Starting npcd"
14 start-stop-daemon --start --exec /usr/bin/npcd \
15 -- -f /etc/pnp/npcd.cfg \
16 -d
17 eend $? "Failed to Start npcd"
18 }
19
20 stop() {
21 ebegin "Stopping npcd"
22 start-stop-daemon --stop --quiet -n npcd
23 eend $? "Failed to Stop npcd"
24 }
25
26 reload() {
27 ebegin "Reloading npcd"
28 kill -HUP `pgrep npcd`
29 eend $? "Failed to reload npcd"
30 }
31
32 restart() {
33 ebegin "Restarting npcd"
34 svc_stop
35 svc_start
36 eend $? "Failed to Restart npcd"
37 }