From 28440aa3820b67de7060bd215449f5b312da940d Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 30 Oct 2020 09:42:07 +0100 Subject: [PATCH] Set blank ipv4 and ipv6 if config is unset. (#1659) * Set blank ipv4 and ipv6 if config is unset. * Use bashio to check if config values are set --- duckdns/CHANGELOG.md | 4 ++++ duckdns/config.json | 2 +- duckdns/data/run.sh | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/duckdns/CHANGELOG.md b/duckdns/CHANGELOG.md index fa8445f..880b0e0 100644 --- a/duckdns/CHANGELOG.md +++ b/duckdns/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.12.3 + +- Dont set IPv4 / IPv6 in duckdns request if config is unset + ## 1.12.2 - Rely on bashio to handle empty IPv4 / IPv6 diff --git a/duckdns/config.json b/duckdns/config.json index 8c0df29..9e6a8b4 100644 --- a/duckdns/config.json +++ b/duckdns/config.json @@ -1,6 +1,6 @@ { "name": "Duck DNS", - "version": "1.12.2", + "version": "1.12.3", "slug": "duckdns", "description": "Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support", "url": "https://github.com/home-assistant/hassio-addons/tree/master/duckdns", diff --git a/duckdns/data/run.sh b/duckdns/data/run.sh index a20891c..bdb3c18 100755 --- a/duckdns/data/run.sh +++ b/duckdns/data/run.sh @@ -7,8 +7,8 @@ WORK_DIR=/data/workdir LE_UPDATE="0" # DuckDNS -IPV4=$(bashio::config 'ipv4') -IPV6=$(bashio::config 'ipv6') +if bashio::config.has_value "ipv4"; then IPV4=$(bashio::config 'ipv4'); else IPV4=""; fi +if bashio::config.has_value "ipv6"; then IPV6=$(bashio::config 'ipv4'); else IPV6=""; fi TOKEN=$(bashio::config 'token') DOMAINS=$(bashio::config 'domains | join(",")') WAIT_TIME=$(bashio::config 'seconds')