Created
September 5, 2012 06:42
-
-
Save happypeter/3631908 to your computer and use it in GitHub Desktop.
quick apple script to restart Airport
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 | |
#################################################################### | |
# | |
# my iMac drop connections sometimes, a quick restart bring it back | |
# | |
#################################################################### | |
networksetup -setairportpower en1 off | |
echo "NOW:" `networksetup -getairportpower en1` | |
networksetup -setairportpower en1 on | |
echo "NOW:" `networksetup -getairportpower en1` | |
# even when I am using wifi, but when I check with `ifconfig`, it is still `en1` that holds the IP | |
# so check ifconfig, if you don't know if you should put "en1" or whatever | |
# here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment