diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-06-08 07:47:34 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-06-08 07:47:34 +0000 |
commit | e754521bd767c50cc20fd33a5adabb0edb02c95a (patch) | |
tree | f860b6071da5f9a8bda74acd62420e411d429168 /main/pmacct/pmacct.initd | |
parent | 00d2ba45bb1510ecfcf18467e86e7380ddf75481 (diff) | |
download | aports-e754521bd767c50cc20fd33a5adabb0edb02c95a.tar.bz2 aports-e754521bd767c50cc20fd33a5adabb0edb02c95a.tar.xz |
unmaintained/pmacct: move to main
Diffstat (limited to 'main/pmacct/pmacct.initd')
-rw-r--r-- | main/pmacct/pmacct.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/pmacct/pmacct.initd b/main/pmacct/pmacct.initd new file mode 100644 index 0000000000..d7cf092108 --- /dev/null +++ b/main/pmacct/pmacct.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/pmacct/files/$SVCNAME-init.d,v 1.4 2009/06/01 09:48:41 pva Exp $ + +depend() { + need net + after firewall +} + +checkconfig() { + if [ ! -e /etc/$SVCNAME.conf ] ; then + eerror "You need an /etc/$SVCNAME.conf file to run $SVCNAME" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting $SVCNAME" + start-stop-daemon --start --pidfile /var/run/$SVCNAME.pid --exec /usr/sbin/$SVCNAME \ + -- -D -f /etc/$SVCNAME.conf -F /var/run/$SVCNAME.pid ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping $SVCNAME" + start-stop-daemon --stop --pidfile /var/run/$SVCNAME.pid --exec /usr/sbin/$SVCNAME + eend $? +} |