diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-09-15 03:43:41 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-09-15 03:43:41 +0200 |
commit | abc736dd0ee0d4ca0006e350f4be91cf6c7732a8 (patch) | |
tree | 5e2b606ef0705e4d181a67c7496ea2a147527d8a /initscript |
initial release
Diffstat (limited to 'initscript')
-rwxr-xr-x | initscript | 42 |
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 |