You can register a script with the WCM that will be called whenever there is a change in the connection status, such as after joining a Zipkey Network, after disconnecting from a Zipkey network, or after connecting to a private network.
Here's how to set up the script:
1. Create a shell script register_status_script.sh (you can name it anything you like)
2. Make sure to make the script executable (chmod 777 register_status_script.sh)
3. Make sure the WCM is running - wcm_cli status
4. Register your script - wcm_cli register_status_script register_status_script.sh&
Some things to note while registering the script
1. The script needs to have permissions set to executable.
2. The script needs to be registered after the wcm_agent has started (so it's a good idea to add this call to the startup script for the WCM itself, as the WCM will not remember this registration across restarts).