| 1 | #!/sbin/openrc-run |
| 2 | # Copyright 1999-2004 Gentoo Foundation |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | # $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 $ |
| 5 | |
| 6 | supervisor=supervise-daemon |
| 7 | |
| 8 | name="$RC_SVCNAME" |
| 9 | |
| 10 | case "$RC_SVCNAME" in |
| 11 | pmacctd) description="promiscuous mode accounting daemon" ;; |
| 12 | nfacctd) description="netflow accounting daemon" ;; |
| 13 | sfacctd) description="sflow accounting daemon" ;; |
| 14 | uacctd) description="ulog accounting daemon" ;; |
| 15 | esac |
| 16 | |
| 17 | command="/usr/sbin/$RC_SVCNAME" |
| 18 | command_args="-f /etc/$RC_SVCNAME.conf $OPTS" |
| 19 | |
| 20 | depend() { |
| 21 | need net |
| 22 | after firewall |
| 23 | } |
| 24 | |
| 25 | checkconfig() { |
| 26 | if [ ! -e /etc/"$RC_SVCNAME".conf ] ; then |
| 27 | eerror "You need an /etc/$RC_SVCNAME.conf file to run $RC_SVCNAME" |
| 28 | return 1 |
| 29 | fi |
| 30 | } |