Created
October 8, 2014 18:11
-
-
Save thebouv/5e53f322d5044b7e8ced to your computer and use it in GitHub Desktop.
fix wifi sharing on mac
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Definitive workaround to wifi-sharing constant breaking down in MacosX
I have found a system that finally works and when, less frequently wifi sharing breaks, it manages to recover it automatically in a minute.
The solution is a
~/Library/LaunchAgents/com.me.wifisharingup.plist
daemon with the next contents:You can see, each minute it runs the simple script that follows. Be careful making the previous plist be owned by the root and launch it with:
The script it launches each minute (don't forget to make it executable) is:
I think the simple periodically (each minute) call to
ipconfig getifaddr en1
refreshes something in what is the wifi sharing daemon. Whatever it is, any moment the wifi sharing fails, it looses the self assigned IP address, and then,ipconfig getifaddr en1
fails, so my script totally resets wifi, making it rebuild its previous status and recovering the wifi-sharing.It has been working for days so far inside a MacMini without keyboard, mouse or monitor, but only plugged into the Ethernet and giving my wifi gadgets access to the world.