Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Relevant: http://www.reddit.com/r/apple/comments/kjtjo/does_there_exist_a_program_to_do_an_event_upon/
- Scroll to bottom to copy text without line numbers.
- File: ~/Library/Scripts/quitTorrent.com (You will likely have to create the Scripts folder)
- -----START FILE HERE-------
- #!/bin/bash
- # Detect if I'm on campus' wifi.
- # Quit Transmission so I don't anger them.
- if [ `networksetup -getairportnetwork en1 | awk {'print $4'}` == "jefferson" ]; then
- killall Transmission
- fi
- exit 0
- -----END FILE HERE-------
- File: ~/Library/LaunchAgents/com.pheterson.quitTorrent.plist (Fill in your account)
- -----START FILE HERE-------
- <plist version="1.0">
- <dict>
- <key>Label</key>
- <string>com.pheterson.quitTorrent</string>
- <key>ProgramArguments</key>
- <array>
- <string>/Users/**YOUR ACCOUNT**/Library/Scripts/quitTorrent.com</string>
- </array>
- <key>WatchPaths</key>
- <array>
- <string>/Library/Preferences/SystemConfiguration</string>
- </array>
- </dict>
- </plist>
- -----END FILE HERE-------
Add Comment
Please, Sign In to add comment