Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- COMMAND=$1
- CONNECTION=$2
- if [ $# -ne 2 ]; then
- echo "usage $0 <command> <connection>"
- echo "available commands are: CONNECT, DISCONNECT"
- echo "available connections are: `ls /etc/vpnc/*.conf`"
- exit 1
- fi
- if [ "$COMMAND" == "CONNECT" ]; then
- vpnc-connect $2
- route del -net 172.20.0.0 netmask 255.255.0.0
- exit 0
- fi
- if [ "$COMMAND" == "DISCONNECT" ]; then
- vpnc-disconnect
- exit 0
- fi
Add Comment
Please, Sign In to add comment