This is non flint 2 related but I'm having a problem with ddns-scripts-cloudflare 2.8.2-12 and luci-app-ddns git-22.123.50005-9139ad4.
The problem is the ddns service for each domain is always "Not Running" after a reboot. I've tried different firmwares initially and then left this problem whilst dealing with VPN stuff.
I'm currently on 4.6.0 beta 3.
If I manually press reload on each ddns service for each domain then the process runs correctly if an update is required, however nothing runs automatically upon boot of the router.
Running root@GL-MT6000:/etc/init.d# /etc/init.d/ddns enabled returns nothing so I think something service wise isn't coming up properly?
There are no log files to check because nothing gets processed.
It looks like me and you are running the same kind of setup. I too have cloudflare and duckdns running via the ddns script. There were a few things I needed to edit for cloudflare to work but are you sure yours is actually working? If you force reload and click edit on cloudflare then what does the log say under "log file viewer" after clicking "the read" button. you should have a log if you forced it and it's running.
Yep that's it. When I run it manually as you said everything works as expected and an update is sent to cloudflare successfully. The trouble is getting that working upon a reboot and so on without having to press reload.
root@GL-MT6000:~# cat /etc/init.d/ddns
#!/bin/sh /etc/rc.common
set -x
START=95
STOP=10
PROG=/usr/lib/ddns/dynamic_dns_updater.sh
bypassvpn=`uci -q get vpnpolicy.global.service_policy`
if [ $bypassvpn = 1 ];then
PROG="sudo -g nonevpn /usr/lib/ddns/dynamic_dns_updater.sh"
else
PROG=/usr/lib/ddns/dynamic_dns_updater.sh
fi
boot() {
return 0
}
reload() {
$PROG -- reload
return 0
}
restart() {
$PROG -- stop
sleep 1 # give time to shutdown
enable=`uci -q get ddns.glddns.enabled`
if [ "$enable" = 1 ];then
$PROG -- start
fi
}
start() {
enable=`uci -q get ddns.glddns.enabled`
if [ "$enable" = 1 ];then
$PROG -- start
fi
}
stop() {
$PROG -- stop
return 0
}
The start function doesn't execute because uci -q get ddns.glddns.enabled returns nothing because I'm not using glddns. But even when I have enabled glddns that command still returns nothing.
So to workaround this for now I added /usr/lib/ddns/dynamic_dns_updater.sh -- start to startup. After a reboot I can see the ddns services are running.
Device: Flint 2
Firmware: 4.6.0 Beta 3 but I've experienced this on all firmware I've tried so far.
I remember on one firmware image I needed to delete the package: gl-sdk4-ddns because it was conflicting and then reinstall ddns and cloudflare. Maybe the reason for uninstalling the package was due to the code you highlighted. By removing the package it also removed some links inside the client GUI however my ddns worked then. The newer firmware I've flashed was good from the off so I didn't need to do anything.
On a fresh install of 4.6.0 beta 2024-06-20 12:48:14 (UTC+00:00)
root@GL-MT6000:~# opkg remove ddns-scripts
all ddns-scriptsNo packages removed.
Updating database.
Database update completed.
root@GL-MT6000:~# opkg remove ddns-scripts-services
No packages removed.
Updating database.
Database update completed.
root@GL-MT6000:~# opkg update
Downloading https://fw.gl-inet.com/releases/mt798x/kmod-4.5.7/aarch64_cortex-a53/mediatek/mt7986/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_core
Downloading https://fw.gl-inet.com/releases/mt798x/packages-4.5/aarch64_cortex-a53/glinet/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_gli_pub
Downloading https://fw.gl-inet.com/releases/mt798x/packages-4.5/aarch64_cortex-a53/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_gli_packages
Updating database.
Database update completed.
root@GL-MT6000:~# opkg install ddns-scripts
Installing ddns-scripts (2.8.2-43) to root...
Downloading https://fw.gl-inet.com/releases/mt798x/packages-4.5/aarch64_cortex-a53/packages/ddns-scripts_2.8.2-43_all.ipk
Collected errors:
* opkg_download: Failed to download https://fw.gl-inet.com/releases/mt798x/packages-4.5/aarch64_cortex-a53/packages/ddns-scripts_2.8.2-43_all.ipk, wget returned 8.
* opkg_install_pkg: Failed to download ddns-scripts. Perhaps you need to run 'opkg update'?
* opkg_install_cmd: Cannot install package ddns-scripts.