NetworkManager and Custom scripts
Im using network manager (and nm-applet) to manage my connections. What I would like to do automatically, is to run a custom script when I successfuly connect to a wireless network and run another custom script when I close that connection.
Ive been looking around for information about this topic but I havent got any luck finding it. Any Ideas on how to do this?
I am not sure, whether you are looking like this or not.
ping -c 1 $GW > /dev/null
[ $exitstatus -eq 0 ] && [ ! -e ~/enable ] && <command to run> && touch ~/enable && exit # This line will execute after getting the connection
[ $exitstatus -ne 0 ] && rm ~/enable && <command to execute> # This line will execute at the end
I hope this logic will work... but didn't check..
Perhaps this will help. http://www.linuxquestions.org/questi...1/#post4579765
|All times are GMT -5. The time now is 12:55 PM.|