Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. set Tunnelblick to "/Applications/Tunnelblick.app"
  2. set VPN to "Home"
  3.  
  4. if application "Tunnelblick" is not running then
  5. tell application "Tunnelblick" to activate
  6. end if
  7.  
  8. tell application "Tunnelblick"
  9. set status to (get state of first configuration where name = VPN)
  10. if (status = "EXITING") then
  11. tell application "Tunnelblick"
  12. connect VPN
  13. end tell
  14. else
  15. tell application "Tunnelblick"
  16. disconnect VPN
  17. end tell
  18. end if
  19. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement