Skip to content

Instantly share code, notes, and snippets.

@MichaelBlume
Last active August 29, 2015 14:15
Show Gist options
  • Save MichaelBlume/024c0add54ffe61ea1d4 to your computer and use it in GitHub Desktop.
Save MichaelBlume/024c0add54ffe61ea1d4 to your computer and use it in GitHub Desktop.
don't let me leave tethering on when I don't need it
#!/usr/bin/env bash
wifis=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s`
hwwifis=`echo "$wifis" | grep "Climate\|Volterra"`
tether=`echo "$wifis" | grep "Mike"`
if [ -n "$hwwifis" ] && [ -n "$tether" ]; then
growlnotify -s -m "stop tethering"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment