Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cjohnson496/009077bdcf63fbaebc2759e4aad328ed to your computer and use it in GitHub Desktop.
Save cjohnson496/009077bdcf63fbaebc2759e4aad328ed to your computer and use it in GitHub Desktop.
A launchd daemon to execute a Python script when network configuration changes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>prehensile.networkwatcher</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Users/henry/Scripts/BigPicture.py</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Preferences/SystemConfiguration</string>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment