Created
August 9, 2019 21:12
-
-
Save evantahler/e5b2ad349d022f7d1165d9417a737603 to your computer and use it in GitHub Desktop.
Keep that VPN Connected (OSX)
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
on idle | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNService to the service "vpn-evan" -- replace this with the name of your VPN connection | |
if VPNService is not null then | |
if current configuration of VPNService is not connected then | |
beep | |
beep | |
beep | |
connect VPNService | |
end if | |
end if | |
end tell | |
end tell | |
-- in "idle" blocks, the number returned is how long to sleep until running again | |
return 60 | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read more @ https://blog.evantahler.com/keep-that-vpn-connected-macos-b331719df200