Last active
August 21, 2024 00:10
-
-
Save tree-s/83c192f89b1e2ba06cad3e3f75a3923a to your computer and use it in GitHub Desktop.
VPN reconnect applescript
This file contains hidden or 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 myConnection to the service "__vpn_service_name__" | |
if myConnection is not null then | |
if current configuration of myConnection is not connected then | |
connect myConnection | |
end if | |
end if | |
end tell | |
return 120 | |
end tell | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment