Skip to content

Instantly share code, notes, and snippets.

@NaanProphet
Last active January 24, 2024 16:47
Show Gist options
  • Save NaanProphet/124c28368ad0f075ca93 to your computer and use it in GitHub Desktop.
Save NaanProphet/124c28368ad0f075ca93 to your computer and use it in GitHub Desktop.
DuckDNS shell script for Asus Merlin Routers
Tested on an ASUS RT-AC56U running Merlin firmware 378.55
#!/bin/sh
### location: anywhere, preferably outside the jffs partition on an external flash drive
### because the jffs partition ROM has a limited number of writes.
### ensure this file has execute permissions
# the name of your sub-domain on duckdns.org
DOMAIN=
# your private token
TOKEN=
touch /tmp/000duckdnsstarted
echo url="https://www.duckdns.org/update?domains=${DOMAIN}&token=${TOKEN}&ip=" | curl -k -o
#!/bin/sh
### location: /jffs/scripts/
### ensure this file has execute permissions
# path to bash script to talk to DuckDNS servers
REFRESH_SCRIPT=/mnt/OPTWARE/duckdns/duck.sh
# add duckdns refresh to crontab
cru a duckdns "5 * * * * ${REFRESH_SCRIPT} >/dev/null 2>&1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment