Thread: NetworkManager Dispatcher not executing scripts
hello all,
i've script depending on network connection changes smtp server in evolution.
i've set script permissions according man instructions , saved script in folder /etc/networkmanager/dispatcher.d/
#!/bin/bash
interfaccia="$1"
stato="$2"
rete=`iwgetid -s`
if [ "$rete" == "androidap" ]; then
nuovosmtp="smtp.net.vodafone.it"
fi
setupsmtp=`gconftool-2 --get /apps/evolution/mail/accounts | sed "s/\(smtp:\/\/\)[^;]*/\1${nuovosmtp}\//g"`
gconftool-2 --unset /apps/evolution/mail/accounts
gconftool-2 --type=list --list-type=string --set /apps/evolution/mail/accounts "$setupsmtp"
if run script shell, works fine. if change network connection, nothing happens.
i've tried put sleep "3s" @ beginning, i've included complete path of each command, no result...
missing?
thanks!
-paolo
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Networking & Wireless [ubuntu] NetworkManager Dispatcher not executing scripts
Ubuntu
Comments
Post a Comment