ipsec 451 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2014 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need net
  6. use logger
  7. }
  8. start() {
  9. ebegin "Starting ${IPSECD}"
  10. ipsec start
  11. eend $?
  12. }
  13. stop() {
  14. ebegin "Stopping ${IPSECD}"
  15. ipsec stop
  16. eend $?
  17. }
  18. restart() {
  19. ebegin "Restarting ${IPSECD}"
  20. svc_stop
  21. sleep 2
  22. svc_start
  23. eend $?
  24. }
  25. status() {
  26. ebegin "${IPSECD} Status (verbose):"
  27. ipsec statusall
  28. eend $?
  29. }