ddclient/ddclient

use= must be higher up in config file.

PlayaJay22 opened this issue · 1 comments

My original config file was this:

# ddclient configuration file
# check every 600 seconds
daemon=600s
# log update msgs to syslog
syslog=yes
# mail-failure=email@email.com # Mail failed updates to user
# record PID in file.
pid=/var/run/ddclient.pid
ssl=yes
# use HTTPS
## Detect IP with our CheckIP server (alternative to use=if)
#use=web, web=checkip.dyndns.com/, web-skip='IP Address'
## DynDNS username and password here
login=login
password=pwd
## Default options
protocol=dyndns2
server=members.dyndns.org
## Dynamic DNS hosts
myhostname.com

##Query interface
use=if, if=wwan0

Running command:
/usr/sbin/ddclient -daemon=0 -debug -verbose -noquiet -foreground

But I kept getting the error:
ARNING: found neither ipv4 nor ipv6 address
DEBUG: get_ip: using ip, ip reports
WARNING: unable to determine IP address

The fix was to move the line "use=if, if=wwan0" higher up in the file:

# ddclient configuration file
# check every 600 seconds
daemon=600s
# log update msgs to syslog
syslog=yes
# mail-failure=email@email.com # Mail failed updates to user
# record PID in file.
pid=/var/run/ddclient.pid
ssl=yes
##Query interface (Don't put this line any lower in the file!)
use=if, if=wwan0
# use HTTPS
## Detect IP with our CheckIP server (alternative to use=if)
#use=web, web=checkip.dyndns.com/, web-skip='IP Address'
## DynDNS username and password here
login=login
password=pwd
## Default options
protocol=dyndns2
server=members.dyndns.org
## Dynamic DNS hosts
myhostname.com

I think this is a bug/issue and shouldn't matter what order the config items are in

This is sadly a side effect of the config parsing - it goes line by line and applies all the settings above a host configuration to that host. See here