]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/pmacct/files/pmacct.init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / pmacct / files / pmacct.init
1 #!/bin/sh
2
3 PATH=/bin:/usr/bin:/sbin:/usr/sbin
4 IFACES="eth0"
5 PIPES="in out"
6
7 case "$1" in
8         start)
9                 echo -n "Starting pmacct daemon"
10                 for iface in $IFACES; do
11                         pmacctd -f /etc/pmacct/pmacct.conf.$iface
12                 done
13                 echo "."
14         ;;
15         stop)
16                 echo -n "Stopping pmacct daemon"
17                 killall -INT pmacctd
18                 echo "."
19         ;;
20         restart)
21                 $0 stop
22                 $0 start
23         ;;
24         show)
25                 for iface in $IFACES; do
26                         echo "= $iface ======================="
27                         for pipe in $PIPES; do
28                                 echo "- $pipe -----------------------"
29                                 pmacct -s -p /var/run/pmacct-$iface-$pipe.pipe
30                         done
31                 done
32         ;;
33         *)
34                 echo "Usage: $0 {start|stop|restart|show}"
35                 exit 1
36         ;;
37 esac
38
39 exit 0