Created
March 10, 2016 13:41
-
-
Save henryaj/db2eb74ca1fe50d42586 to your computer and use it in GitHub Desktop.
AppleScript to keep a VPN connection alive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repeat | |
tell application "System Events" | |
tell current location of network preferences | |
set myConnection to the service "YOUR_VPN_NAME" | |
if myConnection is not null then | |
if current configuration of myConnection is not connected then | |
connect myConnection | |
end if | |
end if | |
end tell | |
end tell | |
delay 30 | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment