On di, 2007-03-27 at 10:18 -0400, Darren Albers wrote:
> As Derek Atkins point out NetworkManagerDispatcher does this, there is
> a script submitted by Matt Good that does something similar for ATT
> hotspots:
> http://www.darrenalbers.net/wiki/index.php?title=NetworkManagerScripts
Is there a similar thing for VPN connections?
Not exactly, but there's a DBUS signal on system bus when VPN state changes. Here's the info:
path=/org/freedesktop/NetworkManager/VPNConnections
interface=org.freedesktop.NetworkManager.VPNConnections
member=VPNConnectionStateChange
The signal has two arguments, vpn connection name (string) and connection state (uint32), state == 5 means connected, state == 1 means disconnected. Shouldn't be longer than ~10 lines of python.