This is a very specific #macOS and #Wireguard question.
Is there a way to start a Wireguard tunnel (which I now do manually for reasons which will become obvious) when you change your Location to specific ones?
For example:
* Location "Office" -> no Wireguard
* Location "Home" -> Wireguard to specific endpoint
* Location "Automatic" -> Wireguard to another endpoint
I know the launchd trick¹ to have it run at startup but this would be "all the time" as opposed to location-dependent:
I'm sure there is a magic macOS incantation for it 
__
¹ for those who don't know how to start Wireguard at boot on macOS:
cat > com.wireguard.endpoint.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.wireguard.endpoint</string>
<key>ProgramArguments</key>
<array>
<!-- Points to local version of wg-quick that
fixes path issues with the script -->
<string>/opt/local/bin/wg-quick</string>
<string>up</string>
<string>endpoint</string>
</array>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/opt/local/var/log/wireguard.err</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<!-- Adds in user-specific and MacPorts bin directories to start of PATH -->
<string>/opt/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
</dict>
</plist>
EOF
Followed by:
sudo cp com.wireguard.endpoint.plist /Library/LaunchDaemons
sudo launchctl enable system/com.wireguard.endpoint
sudo launchctl bootstrap system /Library/LaunchDaemons/com.wireguard.endpoint.plist