updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / fwlogwatch / fwlogwatch
blob0afbecffe35808221209e9829dee74d92c247814
1 #!/bin/bash
3 # source application-specific settings
4 [ -f /etc/conf.d/fwlogwatch ] && . /etc/conf.d/fwlogwatch
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 PID=`pidof -o %PPID /usr/sbin/fwlogwatch`
10 case "$1" in
11 start)
12 stat_busy "Starting fwlogwatch"
13 [ -z "$PID" ] && /usr/sbin/fwlogwatch ${ARGS}
14 if [ $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon fwlogwatch
18 stat_done
21 stop)
22 stat_busy "Stopping fwlogwatch"
23 [ ! -z "$PID" ] && kill $PID &> /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon fwlogwatch
28 stat_done
31 restart)
32 $0 stop
33 $0 start
36 echo "usage: `basename $0` {start|stop|restart}"
37 esac
38 exit 0