summaryrefslogtreecommitdiff
path: root/package/shorewall-common/files/shorewall.init
blob: 5c5a4660aabd701e8a40370480d8f589fecc105b (plain)
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
#!/bin/sh
#PKG shorewall-common
#INIT 45
. /etc/rc.conf

case $1 in
autostop) ;;
autostart)
	test x"${shorewall:-NO}" != x"YES" && exit 0
	test x"$shorewall" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
	exec sh $0 start
	;;
start)
	touch /var/log/messages
	mkdir -p /var/lock/subsys
	/sbin/shorewall -f start 1>/dev/null
	;;
stop)
	/sbin/shorewall stop 1>/dev/null
	;;
restart)
	if [ -f /var/lib/shorewall/restore ] ; then
	/sbin/shorewall restore
	else
	/sbin/shorewall restart 1>/dev/null
	fi
	;;
clear)
	/sbin/shorewall clear
	;;
*)
	echo "Usage: $0 {start|stop|restart|clear}"
	;;
esac
exit $?