Skip to content

Instantly share code, notes, and snippets.

@billmote
Forked from patrickhammond/bouncewifi.sh
Last active August 29, 2015 14:11
Show Gist options
  • Save billmote/80d44f1b23c0b18378d7 to your computer and use it in GitHub Desktop.
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
#!/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
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