-
-
Save billmote/80d44f1b23c0b18378d7 to your computer and use it in GitHub Desktop.
Starbucks has started bumping you off their WiFi every 60 minutes. This will quickly toggle your WiFi off/on to avoid unexpected interruptions. #FWP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while true; do | |
sleep 3300 # 55 min * 60 sec | |
echo "Bouncing the wifi at `date`" | |
# You might need to change en1 to something else. | |
# ifconfig can tell you what network adapter to use | |
networksetup -setairportpower en1 off | |
sleep 2 | |
networksetup -setairportpower en1 on | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -ef | awk '/.\/bounce_wifi_hourly.sh/{print $2}' | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment