Advertisement
RobbieL811

VPN Script

Dec 28th, 2015
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.49 KB | None | 0 0
  1. #!/bin/bash
  2. declare -A config=(
  3.   # Atlanta
  4.   ["seed-rl"]='seed-rl'
  5.   ['atl10']='Atlanta-10'
  6.   ['atl11']='Atlanta-11'
  7.   ['atl12']='Atlanta-12'
  8.   # New York
  9.   ['nyc02']='NewYork-02'
  10.   ['nyc10']='NewYork-10'
  11.   ['nyc11']='NewYork-11'
  12.   ['nyc14']='NewYork-14'
  13.   ['nyc16']='NewYork-16'
  14.   ['nyc20']='NewYork-20'
  15. )
  16. if [[ -z $STY ]]; then
  17.   exec screen -S vpn -d -m /bin/bash "$0" "$1"
  18.   exit $?
  19. fi
  20. cd "/home/robbiel811/vpn configs"
  21. echo password | sudo -S openvpn --config "${config[$1]}.ovpn"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement