Closed mathengines closed 6 years ago
Hey, @mathengines, thank you so much for a such detailed report! It makes a total sense to add RunAtLoad
option, I'll modify the script after I come from the vacation or feel free to send a pull request.
I think the problem could be that at login the Wi-Fi network at home is joined before the launch agent is loaded and the event is missed. At school, hundred of students may join the school Wi-Fi within a short time and the process finishes probably after the loading of the launch agent which has more chance to detect the event. The RunAtLoad
option secures the detection of network change at login.
I have defined a new network location on a laptop for my kid to work at school. At home, the "Automatic" location is used. The Wi-Fi networks are joined automatically after login. At school, the network location switches automatically to the user defined location as expected. But at home, it doesn't switch back to the "Automatic" location until the Wi-Fi connection is turned off/on. The log file reflects this behaviour.
Notes:
<key>RunAtLoad</key><true/>