midwire
4/30/2014 - 1:47 PM

Stay connected to your VPN...

Stay connected to your VPN...

# Change service (VPN) name to the name of your configured VPN service
on idle
  tell application "System Events"
    tell current location of network preferences
      set myConnection to the service "RentPath"
      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