RUT241 DDNS Custom Script

Hi There

I have RUT241 Firmware v7.22 - I cannot get a custom ddns script to excecute with dyn.org profile. The script works fine when executed from cmd, and works in other rut devices RUT240 and RUT901. The standard internal script “public” works. As a work around - I have written my own dyn update script and run from cron.
Advice appeciated.

Here is some diagostics.

/etc/init.d/ddns restart
root@RUT241:~# logread -f
753 Tue Aug 4 10:44:06 2026 user.notice ddns: myddns[22834]: pid ‘22834’ started at 2026-08-04 10:44
754 Tue Aug 4 10:44:08 2026 user.warn ddns: myddns[22834]: Script to detect local IP not executable! - terminate
755 Tue Aug 4 10:44:08 2026 user.warn ddns: myddns[22834]: pid ‘22834’ exit with error ‘1’ at 2026-08-04 10:44

wehave excecute permissions

root@RUT241:~# ls -l dyndns_relay.sh
-rwxr-xr-x 1 root root 204 Aug 4 10:26 dyndns_relay.sh

#code in script
dyndns_relay.sh

#!/bin/sh

#dynaddress relay
#relays parameters to waninterfacelist.sh if needed for specific device

#write to log - btw this never executes when run by the ddns process.

echo $(date) > /tmp/ddns.log

#call script to search the WAN interfaces - select the one we want in this case to be assigned to the ddns address and retunr just the IPV4 address.

_IP=$(sh /root/waninterfacelist.sh “” 1 PRIMARY)

#write to log for diagnostics.

echo “$_IP” >> /tmp/ddns.log
echo “$_IP”
exit 0

#ddns profile

config ddns ‘global’
option ddns_dateformat ‘%F %R’
option ddns_loglines ‘250’
option upd_privateip ‘1’
option use_curl ‘1’

config service ‘myddns’
option service_name ‘dyn.com
option use_ipv6 ‘0’
option username ‘’ ---- redacted
option use_https ‘0’
option check_interval ‘10’
option lookup_host ‘rut-demo.dyndns.org
option force_unit ‘hours’
option check_unit ‘minutes’
option domain ‘rut-demo.dyndns.org
option password '
****’ —redacted
option cacert ‘IGNORE’
option force_interval ‘12’
option enabled ‘1’
option ip_source ‘script’
option ip_network ‘wan’
option interface ‘wan’
option ip_script ‘/root/dyndns_relay.sh

root@RUT241:~# [ -x /root/dyndns_relay.sh ] && echo YES || echo NO
YES
root@RUT241:~# ps | grep ddns
25278 root 1988 S vi /etc/config/ddns
27770 root 1932 S grep ddns