#!/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