summaryrefslogtreecommitdiffstats
path: root/main/pmacct/pmacct.initd
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-10-26 09:29:10 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-10-26 09:29:10 +0000
commit9209ca280e67dd06672435c23e23d3f9f7e8aaa8 (patch)
tree479d809171f57bc74bc8ea0f7728d3515bb4194e /main/pmacct/pmacct.initd
parent8ff4faf39092bc7c8e46baa18d9f026bb8c7cbd2 (diff)
downloadaports-9209ca280e67dd06672435c23e23d3f9f7e8aaa8.tar.bz2
aports-9209ca280e67dd06672435c23e23d3f9f7e8aaa8.tar.xz
testing/pmacct: moved to main
Diffstat (limited to 'main/pmacct/pmacct.initd')
-rw-r--r--main/pmacct/pmacct.initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/main/pmacct/pmacct.initd b/main/pmacct/pmacct.initd
new file mode 100644
index 000000000..e6e6a3f65
--- /dev/null
+++ b/main/pmacct/pmacct.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# 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 $?
+}