updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / arno-iptables-firewall / arno-iptables-firewall.script
blob4a7071e320394d0927a07edda1491ff8f903b103
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 case "$1" in
8 start)
9 stat_busy "Starting Arno's Iptables Firewall Daemon"
10 /usr/sbin/arno-iptables-firewall start &>/dev/null
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon arno-iptables-firewall
15 stat_done
18 stop)
19 stat_busy "Stopping Arno's Iptables Firewall Daemon"
20 /usr/sbin/arno-iptables-firewall stop &>/dev/null
21 if [ $? -gt 0 ]; then
22 stat_fail
23 else
24 rm_daemon arno-iptables-firewall
25 stat_done
28 force_reload)
29 stat_busy "Reloading Arno's Iptables Firewall Daemon"
30 /usr/sbin/arno-iptables-firewall force-reload &>/dev/null
31 if [ $? -gt 0 ]; then
32 stat_fail
33 else
34 rm_daemon arno-iptables-firewall
35 stat_done
38 restart)
39 $0 stop
40 sleep 3
41 $0 start
43 status)
44 /usr/sbin/arno-iptables-firewall status
46 debug_start)
47 stat_busy "Starting Arno's Iptables Firewall Daemon"
48 /usr/sbin/arno-iptables-firewall start
49 if [ $? -gt 0 ]; then
50 stat_fail
51 else
52 add_daemon arno-iptables-firewall
53 stat_done
56 debug_stop)
57 stat_busy "Stopping Arno's Iptables Firewall Daemon"
58 /usr/sbin/arno-iptables-firewall stop
59 if [ $? -gt 0 ]; then
60 stat_fail
61 else
62 rm_daemon arno-iptables-firewall
63 stat_done
66 debug_restart)
67 $0 debug_stop
68 sleep 3
69 $0 debug_start
72 echo "usage: $0 {start|stop|force_reload|restart|status|debug_start|debug_stop|debug_restart}"
73 esac