2009-02-22 18:19:19 +01:00
|
|
|
#!/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
|
|
|
|
#
|
2012-04-24 23:52:57 +02:00
|
|
|
# http://rafb.net/p/1gsyye11.html
|
2009-02-22 18:19:19 +01:00
|
|
|
|
|
|
|
OPTIONS=""
|
|
|
|
|
2014-10-30 18:22:39 +01:00
|
|
|
# Use /etc/default shorewall6 to specify $OPTIONS and STARTOPTIONS to
|
|
|
|
# run at startup, however this this might prevent shorewall6 from
|
|
|
|
# starting. use at your own risk
|
2009-02-22 18:19:19 +01:00
|
|
|
if [ -f /etc/default/shorewall6 ] ; then
|
|
|
|
. /etc/default/shorewall6
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
start() {
|
|
|
|
echo "Starting IPv6 shorewall rules..."
|
2014-10-30 18:22:39 +01:00
|
|
|
exec /sbin/shorewall6 $OPTIONS start $STARTOPTIONS
|
2009-02-22 18:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
echo "Stopping IPv6 shorewall rules..."
|
|
|
|
exec /sbin/shorewall6 stop
|
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
|
|
|
echo "Restarting IPv6 shorewall rules..."
|
2014-10-30 18:22:39 +01:00
|
|
|
exec /sbin/shorewall6 restart $RESTARTOPTIONS
|
2009-02-22 18:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|