This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# register a subdomain at https://www.duckdns.org/ to get your token | |
# put 'hostname:token' in the 'Host Name' field under DDNS | |
# e.g. myhost:abcdefgh-1234-5678-9876-f71b0ed7a7fe | |
DDNS_HOSTNAME_FIELD=$(nvram get ddns_hostname_x) | |
SUBDOMAIN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F':' '{print $1}') | |
TOKEN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F':' '{print $2}') | |
IPV4=$(nvram get wan0_ipaddr) |