dynamicdns: Fix starting daemon for no NAT

Incase the machine is not behind NAT, fix the logic that decides to
start the daemon.
This commit is contained in:
Sunil Mohan Adapa 2016-02-01 11:03:54 +05:30
parent 51dd1bb000
commit 83ec57414c
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971

View File

@ -339,7 +339,7 @@ case ${cmd} in
if [ "$(grep ^NAT ${HELPERCFG} | awk '{print $2}')" = "no" ];then
#if we are not behind a NAT device and we use gnudip, start the daemon tool
gnudipServer=$(grep ^server= ${cfgfile} 2> /dev/null | cut -d = -f 2- |grep -v ^\'\')
if [ -f ${CFG} -a ! -z "${gnudipServer}" ];then
if [ ! -f ${CFG} -a ! -z "${gnudipServer}" ];then
mv ${CFG_disabled} ${CFG}
/etc/init.d/${TOOLNAME} start
fi