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
This commit is contained in:
Jonas
2020-10-30 09:42:07 +01:00
committed by GitHub
parent 615f71cfd7
commit 28440aa382
3 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
# Changelog # Changelog
## 1.12.3
- Dont set IPv4 / IPv6 in duckdns request if config is unset
## 1.12.2 ## 1.12.2
- Rely on bashio to handle empty IPv4 / IPv6 - Rely on bashio to handle empty IPv4 / IPv6

View File

@@ -1,6 +1,6 @@
{ {
"name": "Duck DNS", "name": "Duck DNS",
"version": "1.12.2", "version": "1.12.3",
"slug": "duckdns", "slug": "duckdns",
"description": "Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support", "description": "Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/duckdns", "url": "https://github.com/home-assistant/hassio-addons/tree/master/duckdns",

View File

@@ -7,8 +7,8 @@ WORK_DIR=/data/workdir
LE_UPDATE="0" LE_UPDATE="0"
# DuckDNS # DuckDNS
IPV4=$(bashio::config 'ipv4') if bashio::config.has_value "ipv4"; then IPV4=$(bashio::config 'ipv4'); else IPV4=""; fi
IPV6=$(bashio::config 'ipv6') if bashio::config.has_value "ipv6"; then IPV6=$(bashio::config 'ipv4'); else IPV6=""; fi
TOKEN=$(bashio::config 'token') TOKEN=$(bashio::config 'token')
DOMAINS=$(bashio::config 'domains | join(",")') DOMAINS=$(bashio::config 'domains | join(",")')
WAIT_TIME=$(bashio::config 'seconds') WAIT_TIME=$(bashio::config 'seconds')