vpnctl 333 B

12345678910111213141516171819
  1. #!/bin/sh
  2. #
  3. case X$1 in
  4. Xup|X1|Xstart) connMode=vpn-connect ;;
  5. Xdown|X0|Xstop) connMode=vpn-disconnect ;;
  6. *)
  7. echo "Usage: $0: up|1|start || down|0|stop"
  8. exit 1 ;;
  9. esac
  10. if [ -s /var/racoon/peers.txt ]; then
  11. (while read ipa ; do
  12. racoonctl $connMode $ipa
  13. done) < /var/racoon/peers.txt
  14. fi
  15. # EOF /usr/bin/vpnctl