Created
May 13, 2015 20:00
-
-
Save falsefalse/9622cc87716082867e53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#! /usr/bin/env bash | |
function nEnabled { | |
system_profiler -detailLevel mini SPAirPortDataType | grep -e 'Supported PHY Modes: .*n' | |
} | |
until nEnabled && sleep 5 && nEnabled; | |
do | |
echo 'resetting airport' | |
networksetup -setairportpower en1 off; networksetup -setairportpower en1 on | |
sleep 2 | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment