shorewall.init 613 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. #PKG shorewall-common
  3. #INIT 45
  4. . /etc/rc.conf
  5. case $1 in
  6. autostop) ;;
  7. autostart)
  8. test x"${shorewall:-NO}" != x"YES" && exit 0
  9. test x"$shorewall" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
  10. exec sh $0 start
  11. ;;
  12. start)
  13. touch /var/log/messages
  14. mkdir -p /var/lock/subsys
  15. /sbin/shorewall -f start 1>/dev/null
  16. ;;
  17. stop)
  18. /sbin/shorewall stop 1>/dev/null
  19. ;;
  20. restart)
  21. if [ -f /var/lib/shorewall/restore ] ; then
  22. /sbin/shorewall restore
  23. else
  24. /sbin/shorewall restart 1>/dev/null
  25. fi
  26. ;;
  27. clear)
  28. /sbin/shorewall clear
  29. ;;
  30. *)
  31. echo "Usage: $0 {start|stop|restart|clear}"
  32. ;;
  33. esac
  34. exit $?