summaryrefslogtreecommitdiff
path: root/initscript
diff options
context:
space:
mode:
Diffstat (limited to 'initscript')
-rwxr-xr-xinitscript42
1 files changed, 42 insertions, 0 deletions
diff --git a/initscript b/initscript
new file mode 100755
index 0000000..296e48d
--- /dev/null
+++ b/initscript
@@ -0,0 +1,42 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides: firewall
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Configure Firewall.
+### END INIT INFO
+
+# saswall init script which uses the simple and safe firewall loader
+# please don't add any firewall rules here
+# edit /etc/saswall/rules.sh instead
+
+PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
+FIREWALL_SCRIPT="/usr/local/sbin/saswall"
+
+. /lib/lsb/init-functions
+
+case "$1" in
+start)
+ log_action_begin_msg "Loading Firewall rules"
+ $FIREWALL_SCRIPT up
+ log_action_end_msg $?
+ ;;
+stop)
+ log_action_begin_msg "Clearing Firewall rules"
+ echo -n " "
+ $FIREWALL_SCRIPT down
+ log_action_end_msg $?
+ ;;
+force-reload|restart)
+ echo "Reloading Firewall"
+ $FIREWALL_SCRIPT reload
+ ;;
+*)
+ echo "Usage: /etc/init.d/firewall {start|stop|force-reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0