mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-30 03:23:47 +01:00
b52477a629
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4079 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
59 lines
1.0 KiB
Bash
Executable File
59 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
OPTIONS="-f"
|
|
|
|
if [ -f /etc/sysconfig/shorewall ] ; then
|
|
. /etc/sysconfig/shorewall
|
|
elif [ -f /etc/default/shorewall ] ; then
|
|
. /etc/default/shorewall
|
|
fi
|
|
|
|
# if you want to override options, do so in /etc/sysconfig/shorewall or
|
|
# in /etc/default/shorewall --
|
|
# i strongly encourage you use the latter, since /etc/sysconfig/ does not exist.
|
|
|
|
. /etc/rc.conf
|
|
. /etc/rc.d/functions
|
|
|
|
DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon.
|
|
|
|
case "$1" in
|
|
start)
|
|
stat_busy "Starting $DAEMON_NAME"
|
|
/sbin/shorewall-lite $OPTIONS start &>/dev/null
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
add_daemon $DAEMON_NAME
|
|
stat_done
|
|
fi
|
|
;;
|
|
|
|
|
|
stop)
|
|
stat_busy "Stopping $DAEMON_NAME"
|
|
/sbin/shorewall-lite stop &>/dev/null
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
rm_daemon $DAEMON_NAME
|
|
stat_done
|
|
fi
|
|
;;
|
|
|
|
restart|reload)
|
|
stat_busy "Restarting $DAEMON_NAME"
|
|
/sbin/shorewall-lite restart &>/dev/null
|
|
if [ $? -gt 0 ]; then
|
|
stat_fail
|
|
else
|
|
stat_done
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo "usage: $0 {start|stop|restart}"
|
|
esac
|
|
exit 0
|
|
|