Saturday, March 14, 2009

Starting a script after NetworkManager

I need to access a VPN. But to be able to start the VPN I need a network connection. How to know when NetworkManager has already created your connection? By refering to here, you can add scripts into the /etc/NetworkManager/dispatcher.d to be run by network manager everytime an interface go up or down.



if [ "$STATUS" = "up" ]; then
/etc/rc.d/openvpn start
/etc/rc.d/openvpn stop

So that openvpn will start straight away whenever any interface (IF) has the status up.

Haiya ala Solah