diff --git a/letsencrypt/CHANGELOG.md b/letsencrypt/CHANGELOG.md index cd69048..75ddcb1 100755 --- a/letsencrypt/CHANGELOG.md +++ b/letsencrypt/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.7 + +- Fix issue with DNS challenge + ## 4.6 - Streamline propagation seconds diff --git a/letsencrypt/config.json b/letsencrypt/config.json index 913c4bb..40306c9 100755 --- a/letsencrypt/config.json +++ b/letsencrypt/config.json @@ -1,6 +1,6 @@ { "name": "Let's Encrypt", - "version": "4.6", + "version": "4.7", "slug": "letsencrypt", "description": "Manage certificate from Let's Encrypt", "url": "https://github.com/home-assistant/hassio-addons/tree/master/letsencrypt", diff --git a/letsencrypt/data/run.sh b/letsencrypt/data/run.sh index 0384627..8d2a9e6 100755 --- a/letsencrypt/data/run.sh +++ b/letsencrypt/data/run.sh @@ -5,9 +5,10 @@ DOMAINS=$(bashio::config 'domains') KEYFILE=$(bashio::config 'keyfile') CERTFILE=$(bashio::config 'certfile') CHALLENGE=$(bashio::config 'challenge') +DNS_PROVIDER=$(bashio::config 'dns.provider') -if [[ "$CHALLENGE" == "dns" ]]; then - bashio::log.info "Selected DNS Provider: $(bashio::config 'dns.provider')" +if [ "${CHALLENGE}" == "dns" ]; then + bashio::log.info "Selected DNS Provider: ${DNS_PROVIDER}" PROPAGATION_SECONDS=60 if bashio::config.exists 'dns.propagation_seconds'; then @@ -85,7 +86,7 @@ elif bashio::config.exists 'dns.netcup_customer_id' && bashio::config.exists 'dn PROVIDER_ARGUMENTS+=("--authenticator" "certbot-dns-netcup:dns-netcup" "--certbot-dns-netcup:dns-netcup-credentials" /data/dnsapikey "--certbot-dns-netcup:dns-netcup-propagation-seconds" "${PROPAGATION_SECONDS}") # CloudFlare -elif [[ "${DNS_PROVIDER}" == "dns-cloudflare" ]]; then +elif [ "${DNS_PROVIDER}" == "dns-cloudflare" ]; then if bashio::config.exists 'dns.cloudflare_api_token'; then bashio::log.info "Use CloudFlare token" echo "dns_cloudflare_api_token = $(bashio::config 'dns.cloudflare_api_token')" >> /data/dnsapikey