If you do not want to use DBUS, you can also simply abandon the script / program in /etc/NetworkManager/dispatcher.d/where NetworkManager will call it when certain events occur.
See " man 8 NetworkManager" for event types and arguments passed to the script. The script will be executed as root, although perhaps this is not what you want.
8jean source
share