Skip to content

Instantly share code, notes, and snippets.

@patrickhammond
Last active April 30, 2018 21:19
Show Gist options
  • Save patrickhammond/188790d7b9949abe8c2f to your computer and use it in GitHub Desktop.
Save patrickhammond/188790d7b9949abe8c2f to your computer and use it in GitHub Desktop.
Utility to bounce the wifi connection every 55 minutes (to prevent an hourly boot).
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment