mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-25 07:38:57 +01:00
0e8d2452d0
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9485 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
60 lines
1009 B
Bash
Executable File
60 lines
1009 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/rc.shorewall6: start/stop/restart IPv6 rules of Shorewall
|
|
#
|
|
# This should be started from rc.firewall.
|
|
# This script only affect the IPv6 rules and configuration located
|
|
# in /etc/shorewall6
|
|
#
|
|
# http://rafb.net/p/1gsyye11.html
|
|
|
|
OPTIONS=""
|
|
|
|
# Use /etc/default shorewall6 to specify $OPTIONS to run at startup, however this
|
|
# this might prevent shorewall6 from starting. use at your own risk
|
|
if [ -f /etc/default/shorewall6 ] ; then
|
|
. /etc/default/shorewall6
|
|
fi
|
|
|
|
|
|
start() {
|
|
echo "Starting IPv6 shorewall rules..."
|
|
exec /sbin/shorewall6 $OPTIONS start
|
|
}
|
|
|
|
stop() {
|
|
echo "Stopping IPv6 shorewall rules..."
|
|
exec /sbin/shorewall6 stop
|
|
}
|
|
|
|
restart() {
|
|
echo "Restarting IPv6 shorewall rules..."
|
|
exec /sbin/shorewall6 restart
|
|
}
|
|
|
|
status() {
|
|
exec /sbin/shorewall6 status
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
start
|
|
;;
|
|
'stop')
|
|
stop
|
|
;;
|
|
'reload'|'restart')
|
|
restart
|
|
;;
|
|
'status')
|
|
status
|
|
;;
|
|
*)
|
|
echo "Usage: $0 start|stop|reload|restart|status"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|
|
|
|
# All done
|