aboutsummaryrefslogtreecommitdiffstats
path: root/main/pmacct/pmacctd.initd
blob: 5c8319411762bd63d2fc2fd8adbf7ccba38e89f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 $

supervisor=supervise-daemon

name="$RC_SVCNAME"

case "$RC_SVCNAME" in
	pmacctd) description="promiscuous mode accounting daemon" ;;
	nfacctd) description="netflow accounting daemon" ;;
	sfacctd) description="sflow accounting daemon" ;;
	uacctd) description="ulog accounting daemon" ;;
esac

command="/usr/sbin/$RC_SVCNAME"
command_args="-f /etc/$RC_SVCNAME.conf $OPTS"

depend() {
	need net
	after firewall
}

checkconfig() {
	if [ ! -e /etc/"$RC_SVCNAME".conf ] ; then
		eerror "You need an /etc/$RC_SVCNAME.conf file to run $RC_SVCNAME"
		return 1
	fi
}