Last active
April 30, 2018 21:19
-
-
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).
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment