#!/bin/sh # # firebricks Starts and stops a firebricks firewall. # # # chkconfig: 2345 18 92 # description: firebricks is a modular firewall based on iptables. # Version 0.1.1 # Debian flags for runlevels - similar to RH's chkconfig. FLAGS="defaults 19" # Source function library. if [ -f /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi FIREBRICKSCONF=${FIREBRICKSCONF:-"/etc/firebricks/firebricks.conf"} [ -f $FIREBRICKSCONF ] || exit 0 if [ -f $FIREBRICKSCONF ]; then . $FIREBRICKSCONF fi FIREBRICKSLIB=${FIREBRICKSLIB:-"/usr/lib/firebricks/firebrickslib"} if [ -f $FIREBRICKSLIB ]; then . $FIREBRICKSLIB else echo Missing $FIREBRICKSLIB library file. Please get a complete copy of Firebricks from >&2 echo http://www.stearns.org/firebricks/ . Exiting. >&2 exit fi checksys checkconf # See how we were called. case "$1" in start) echo -n "Starting Firebricks firewall: " firebricks-start if [ -d /var/lock/subsys ]; then touch /var/lock/subsys/firebricks fi echo ;; stop) echo -n "Shutting down Firebricks firewall: " firebricks-stop if [ -d /var/lock/subsys ]; then rm -f /var/lock/subsys/firebricks fi echo ;; # status) # status syslogd # status klogd # ;; restart) $0 stop $0 start ;; force-reload) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" exit 1 esac exit 0