Ok, so I had the same behavior that the author of this topic was saying. But, in my case I know why its happening, the main culprit in my case is mwan3 plus having as second wan a 4G wwan adapter, since this devices on startup doesn't come up in that stage, instead they come up once the router is up and running it makes ddns-scripts service think that there will not be any internet connection.
For such case I have created a script if anyone needs it (I know it may be a little be rough but for a few seconds upended on creating it and testing it its a first start and works, I hope someone would improve it a little bit more in time).
#!/bin/sh
ddns_name4=<CONFIGURED SERVICE NAME>
ddns_name6=<CONFIGURED SERVICE NAME>
ddns_check4=$(ps | grep $ddns_name4 | awk 'FNR == 1 { print substr($3, 1) }')
ddns_check6=$(ps | grep $ddns_name6 | awk 'FNR == 1 { print substr($3, 1) }')
if [ -n $ddns_check4 ]
then
echo "$ddns_name4 Service is Up!"
else
/usr/lib/ddns/dynamic_dns_updater.sh -v 0 -S $ddns_name4 -- start
echo "Starting $ddns_name4 service..."
ddns_recheck4=$(ps | grep $ddns_name4 | awk 'FNR == 1 { print substr($3, 1) }')
if [ -n $ddns_recheck4 ]
then
echo "$ddns_name4 Service is Up!"
else
echo "Something went wrong trying to bring back $ddns_name4 service..."
fi
fi
if [ -n $ddns_check6 ]
then
echo "$ddns_name6 Service is Up!"
else
/usr/lib/ddns/dynamic_dns_updater.sh -v 0 -S $ddns_name6 -- start
echo "Starting $ddns_name6 service..."
ddns_recheck6=$(ps | grep $ddns_name6 | awk 'FNR == 1 { print substr($3, 1) }')
if [ -n $ddns_recheck6 ]
then
echo "$ddns_name6 Service is Up!"
else
echo "Something went wrong trying to bring back $ddns_name6 service..."
fi
fi
Also by the way I have created a update script in case someone doesn't want to install this packages, its targeted for HEnet services.
#!/bin/sh
hostname=<HOSTNAME REGISTERED>
password=<HOSTNAME PASSWORD>
wan_interface=<YOUR WAN INTERFACE, MINE IS eth0.2>
check_ipv4=$(ifconfig $wan_interface | grep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1 | cut -d "." -f 1)
check_ipv6=$(ifconfig $wan_interface | grep "inet6 addr" | cut -d "/" -f 2 | cut -d " " -f 1)
if [ $check_ipv4 > 0 ]
then
internet_ipv4=$(wget -q -O - http://checkip.dyndns.com | sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
#
wget -q -O - -4 http://$hostname:$password@dyn.dns.he.net/nic/update?hostname=$hostname&myip=$internet_ipv4
echo "Hostname : $hostname"
echo "Internet IPv4: $internet_ipv4"
if [ $check_ipv6 > 0 ]
then
internet_ipv6=$(wget -q -O - http://checkipv6.dyndns.com | sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
wget -q -O - -6 http://$hostname:$password@dyn.dns.he.net/nic/update?hostname=$hostname&myip=$internet_ipv6
echo "Internet IPv6: $internet_ipv6"
sleep 5
else
sleep 5
fi
else
if [ $check_ipv6 > 0 ]
then
internet_ipv6=$(wget -q -O - http://checkipv6.dyndns.com | sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
wget -q -O - -6 http://$hostname:$password@dyn.dns.he.net/nic/update?hostname=$hostname&myip=$internet_ipv6
echo "Hostname : $hostname"
echo "Internet IPv6: $internet_ipv6"
sleep 5
else
echo "No internet connection detected!"
fi
fi