updated on Wed Jan 18 20:10:41 UTC 2012
[aur-mirror.git] / apf-firewall / apf-arch.init
blob32cd66ada4c715f3f5ff42e2c9591bb04038a2b0
1 #!/bin/bash
2 ##
3 # description: Advanced Policy Firewall
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 case "$1" in
10 start)
11 stat_busy "Starting APF firewall"
12 /usr/local/sbin/apf --start >> /dev/null 2>&1
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon apf-firewall
17 stat_done
20 stop)
21 stat_busy "Stopping APF firewall"
22 /usr/local/sbin/apf --stop >> /dev/null 2>&1
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon apf-firewall
27 stat_done
30 restart)
31 $0 stop
32 $0 start
35 echo "usage: $0 [start|stop|restart]"
36 esac
37 exit $?