#! /bin/sh

PATH=/sbin:/bin

test -x /sbin/firehol || exit 0

set -e

case "$1" in
  start)
	echo -n "Starting iptables firewall: FireHOL ..."
	/sbin/firehol start
	if [ $? = 0 ]; then
		echo "done."
	fi;
	;;
  stop)
	echo -n "Stopping iptables firewall: FireHOL ..."
	/sbin/firehol stop
	if [ $? = 0 ]; then
		echo "done."
	fi;
	;;
  restart|force-reload)
	echo -n "Restarting iptables firewall: FireHOL ..."
	/sbin/firehol restart
	if [ $? = 0 ]; then
		echo "done."
	fi;
	;;
  *)
	N=/etc/init.d/firehol
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
