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.


lxe said...

This does not work for me. Running NM 0.7.996, does this method still work (am I doing something wrong) or have newer builds (since you posted) broken this functionality?

abdza said...

Maybe this might be of help?

Is Blogging No Longer a Thing?

As I embark on my new journey to learn the Rust programming language, I find myself pondering—where have all the blogs gone? In search of pr...