We've been using the following trigger in a LaunchDaemon to spawn a script that disables Wifi:
<key>WatchPaths</key>
<array>
<string>/Library/Preferences/SystemConfiguration</string>
</array>
<key>RunAtLoad</key>
This has been working fine, but I've recently noticed in '/var/log/system.log' that the LaunchDaemon is being spawned multiple times in bursts every ~30 seconds:
Oct 31 16:19:56 --- last message repeated 2 times ---
Oct 31 16:19:56 MALKiosk-22462 com.apple.xpc.launchd[1] (com.mycompany.disable_wifi): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Oct 31 16:20:27 --- last message repeated 2 times ---
Oct 31 16:20:27 MALKiosk-22462 com.apple.xpc.launchd[1] (com.mycompany.disable_wifi): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Oct 31 16:20:58 --- last message repeated 2 times ---
Oct 31 16:20:58 MALKiosk-22462 com.apple.xpc.launchd[1] (com.mycompany.disable_wifi): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Has something changed in a recent OS that makes this folder change repeatedly like this? This seems excessive for this script and I wonder now if there's a better way to achieve this.
Thanks.