summaryrefslogtreecommitdiffstats
path: root/arno-iptables-firewall/arno-iptables-firewall.script
diff options
context:
space:
mode:
Diffstat (limited to 'arno-iptables-firewall/arno-iptables-firewall.script')
-rw-r--r--arno-iptables-firewall/arno-iptables-firewall.script63
1 files changed, 63 insertions, 0 deletions
diff --git a/arno-iptables-firewall/arno-iptables-firewall.script b/arno-iptables-firewall/arno-iptables-firewall.script
new file mode 100644
index 0000000..9607c0a
--- /dev/null
+++ b/arno-iptables-firewall/arno-iptables-firewall.script
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Arno's Iptables Firewall Daemon"
+ /usr/sbin/arno-iptables-firewall start &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon arno-iptables-firewall
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Arno's Iptables Firewall Daemon"
+ /usr/sbin/arno-iptables-firewall stop &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon arno-iptables-firewall
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ status)
+ /usr/sbin/arno-iptables-firewall status
+ ;;
+ debug_start)
+ stat_busy "Starting Arno's Iptables Firewall Daemon"
+ /usr/sbin/arno-iptables-firewall start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon arno-iptables-firewall
+ stat_done
+ fi
+ ;;
+ debug_stop)
+ stat_busy "Stopping Arno's Iptables Firewall Daemon"
+ /usr/sbin/arno-iptables-firewall stop
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon arno-iptables-firewall
+ stat_done
+ fi
+ ;;
+ debug_restart)
+ $0 debug_stop
+ sleep 3
+ $0 debug_start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status|debug_start|debug_stop|debug_restart}"
+esac