Monday, June 2, 2008

VPN Tracker 5 and Adium

VPN Tracker 5 has a feature that lets you automatically run an arbitrary shell script or AppleScript when you connect or disconnect a VPN connection. I have a client who has a VPN and an internal Jabber server. Before I disconnect from their VPN, I want to tell Adium to disconnect from the Jabber server. To do that, do this:

  1. In VPN Tracker, select the VPN connection and choose the Actions tab
  2. Under VPN Shutdown Actions, choose Execute AppleScript.
  3. Save this script as a file somewhere:
    tell application "Adium" to go offline account "michael@chat.example.com"
  4. Click Path and select the file
  5. Now you can click the Execute button to make sure it worked

This works with VPN Tracker version 5.2.2 and Adium version 1.2.5

0 comments: