#! /bin/sh
### BEGIN INIT INFO
# Provides:          firewall
# Required-Start:
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Firewall rules
# Description:       Set up the iptables firewall rules in the kernel
# X-Start-After:     $syslog
# X-Start-Before:    $networking
# X-Stop-After:      $networking
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
START="/usr/local/sbin/firewall"
STOP="/usr/local/sbin/firewallstop"
NAME="firewall"
DESC="firewall script"

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME"
        $START
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME"
        $STOP
	echo "."
	;;
  restart|force-reload)
	#
	#	If the "reload" option is implemented, move the "force-reload"
	#	option to the "reload" entry above. If not, "force-reload" is
	#	just the same as "restart".
	#
	echo -n "Restarting $DESC: $NAME"
        $START
	sleep 1
        $STOP
	echo "."
	;;
  *)
	N=/etc/init.d/$NAME
	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
