Skip to main content

Thread: NetworkManager Dispatcher not executing scripts


hello all,

i've script depending on network connection changes smtp server in evolution.


#!/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"
i've set script permissions according man instructions , saved script in folder /etc/networkmanager/dispatcher.d/

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

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support