diff --git a/duckdns/config.json b/duckdns/config.json index 612022b..1d1e918 100644 --- a/duckdns/config.json +++ b/duckdns/config.json @@ -1,6 +1,6 @@ { "name": "Duck DNS", - "version": "1.6", + "version": "1.7", "slug": "duckdns", "description": "Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support", "url": "https://www.home-assistant.io/addons/duckdns/", @@ -24,6 +24,8 @@ "certfile": "str", "keyfile": "str" }, + "ipv4": "str?", + "ipv6": "str?", "token": "str", "domains": ["str"], "seconds": "int" diff --git a/duckdns/run.sh b/duckdns/run.sh index 01300cf..8ede5e4 100755 --- a/duckdns/run.sh +++ b/duckdns/run.sh @@ -11,6 +11,8 @@ LE_DOMAINS=$(jq --raw-output '.domains[]' $CONFIG_PATH) LE_UPDATE="0" # DuckDNS +IPV4=$(jq --raw-output '.ipv4 // empty' $CONFIG_PATH) +IPV6=$(jq --raw-output '.ipv6 // empty' $CONFIG_PATH) TOKEN=$(jq --raw-output '.token' $CONFIG_PATH) DOMAINS=$(jq --raw-output '.domains | join(",")' $CONFIG_PATH) WAIT_TIME=$(jq --raw-output '.seconds' $CONFIG_PATH) @@ -45,7 +47,7 @@ fi # Run duckdns while true; do - answer="$(curl -sk "https://www.duckdns.org/update?domains=$DOMAINS&token=$TOKEN&ip=&verbose=true")" || true + answer="$(curl -sk "https://www.duckdns.org/update?domains=$DOMAINS&token=$TOKEN&ip=$IPV4&ipv6=$IPV6&verbose=true")" || true echo "$(date): $answer" now="$(date +%s)"