Last active
December 11, 2015 15:28
-
-
Save sirmax/4620933 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env bash | |
function nEnabled { | |
system_profiler -detailLevel mini SPAirPortDataType | grep -e 'Supported PHY Modes: .*n' | |
} | |
until nEnabled && sleep 2 && nEnabled; | |
do | |
echo 'resetting airport' | |
networksetup -setairportpower en1 off; networksetup -setairportpower en1 on | |
sleep 3.123 | |
done | |
networksetup -getairportnetwork en1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment