1
0

shorewall.init 528 B

12345678910111213141516171819202122232425262728293031323334
  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" != x"YES" && exit 0
  9. exec sh $0 start
  10. ;;
  11. start)
  12. touch /var/log/messages
  13. mkdir -p /var/lock/subsys
  14. /sbin/shorewall -f start 1>/dev/null
  15. ;;
  16. stop)
  17. /sbin/shorewall stop 1>/dev/null
  18. ;;
  19. restart)
  20. if [ -f /var/lib/shorewall/restore ] ; then
  21. /sbin/shorewall restore
  22. else
  23. /sbin/shorewall restart 1>/dev/null
  24. fi
  25. ;;
  26. clear)
  27. /sbin/shorewall clear
  28. ;;
  29. *)
  30. echo "Usage: $0 {start|stop|restart|clear}"
  31. ;;
  32. esac
  33. exit $?