Hi, I have TP-Link Archer C6U, ver.1 with OpenWrt 21.02. Ive installed ddns and when I start it manually it is running normally, but when the router reboots ddns service doesnt start automatically. Ive executed /etc/init.d/ddns enable many times, but ddns service doesnt start after reboot.
So I need help to write a shell script, which can check if ddns service is running and if not start it. I intend to put this script in cron and run the script every 3 minutes.
I wrote a short script, but it doesn`t seem to work:
#!/bin/sh /etc/rc.common
cat << "EOF" > /usr/lib/ddns/dynamic_dns_updater.sh
if ! pgrep ddns
then /etc/init.d/ddns reload
fi
EOF
While trying to fix the problem, router got lazy, i.e. 1 min. after login to Luci the router started to lose connection and luci and ssh got unreachable. I couldn`t fix this, so I reset the router to default, then I started installing everything on the router again, i.e. dddns, mwan3, oscam, etc. and this time ddns autostart worked as it should work.
So maybe it was some kind of bad installation last time.