Skip to content

Instantly share code, notes, and snippets.

@nolili
Created March 2, 2014 15:52
Show Gist options
  • Save nolili/9308520 to your computer and use it in GitHub Desktop.
Save nolili/9308520 to your computer and use it in GitHub Desktop.
tell application "System Events"
tell current location of network preferences
set VPN to service "VPN"
if exists VPN then connect VPN
repeat while (current configuration of VPN is not connected)
delay 1
end repeat
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment