From f9473977694ab2a4d0b5a01860e8e50b17d5075f Mon Sep 17 00:00:00 2001 From: bbruns Date: Sun, 13 Apr 2014 17:21:38 +0000 Subject: [PATCH] Added initscript --- doc/srfirewall.init | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 doc/srfirewall.init diff --git a/doc/srfirewall.init b/doc/srfirewall.init new file mode 100755 index 0000000..ba3f1a2 --- /dev/null +++ b/doc/srfirewall.init @@ -0,0 +1,35 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: srfirewall +# Required-Start: $local_fs $network $remote_fs +# Required-Stop: $local_fs $network $remote_fs +# Should-Start: $network $syslog iptables +# Should-Stop: $network $syslog iptables +# X-Start-Before: +# X-Stop-After: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Manage firewall status +# Description: Manage SRFirewall status +### END INIT INFO + +PATH=/bin:/sbin:/usr/bin:/usr/sbin +FIREWALL_CMD=/usr/local/bin/srfirewall +. /lib/lsb/init-functions + +case "${1:-}" in + start) + log_begin_msg "Starting SRFirewall..." + $FIREWALL_CMD + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping SRFirewall..." + $FIREWALL_CMD -f + log_end_msg $? + ;; + *) + log_success_msg "Usage: $0 {start|stop}" + exit 1 +esac +exit 0