# # Automatically reconnect when disconnected from the VPN. # # You don't need this if you're using the NordVPN application. # This is a utility for using native VPN connection settings on MacOS. # on idle tell application "System Events" tell current location of network preferences set myConnection to the service "WorkVPN" 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