File: init.slackware.shorewall6.sh

package info (click to toggle)
shorewall6 5.2.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,252 kB
  • sloc: sh: 1,946; perl: 168; makefile: 34
file content (60 lines) | stat: -rwxr-xr-x 1,065 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/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 and STARTOPTIONS 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/shorewall -6 $OPTIONS start $STARTOPTIONS
}

stop() {
	echo "Stopping IPv6 shorewall rules..."
	exec /sbin/shorewall -6 stop
}

restart() {
	echo "Restarting IPv6 shorewall rules..."
	exec /sbin/shorewall -6 restart $RESTARTOPTIONS
}

status() {
	exec /sbin/shorewall -6 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