#! /bin/sh
#
#     File to start a firestarter firewall script based on the
#     skeleton file provided.
#
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ryan Golbeck <rmgolbeck@debian.org>
#
# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=firestarter
DESC="firestarter firewall"

set -e

# Checks for config file first
[ -x /etc/firestarter/firewall.sh ] || exit 0

case "$1" in
  start)
	echo -n "Starting $DESC: "
	firestarter -u > /dev/null 2>&1
	echo "$NAME."
	;;
  stop)
	echo -n "Stopping $DESC: "
	firestarter -d > /dev/null 2>&1
	echo "$NAME."
	exit 0
	;;
  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: "
	firestarter -d > /dev/null 2>&1
	firestarter -u > /dev/null 2>&1
	echo "$NAME."
	;;
  *)
	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
