projects/aports·blob master · refs

30 lines · 820 B

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
6supervisor=supervise-daemon
7
8name="$RC_SVCNAME"
9
10case "$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" ;;
15esac
16
17command="/usr/sbin/$RC_SVCNAME"
18command_args="-f /etc/$RC_SVCNAME.conf $OPTS"
19
20depend() {
21 need net
22 after firewall
23}
24
25checkconfig() {
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}