Applescript script to automatically start and stop Xtorrent depending on network connection

UPDATED -- I attached the zip of the applescript application here as well (and it's updated to handle quitting cleanly as well as exception catching)

I decided to write a script that would automatically quit Xtorrent if my VPN tunnel went down. I wrote it so you could use any network connection (or should be able to), but only tested it with a VPN connection. The script runs in the background and will automatically spin up the VPN of your choosing and will kick up Xtorrent for you as well. It checks every 6 seconds to determine if the network connection is down, and if it is, it quits Xtorrent and tries to bring the connection back up. Once the connection comes back up, it will restart Xtorrent. Figured I'd share the Applescript in case anyone else out there was interested in the same thing. Click for the script.
Read More...
|