Skip to content

Commit

Permalink
letsencrypt: fix TransIP global_key handling
Browse files Browse the repository at this point in the history
* follow-up to #3862

Co-authored-by: Goopher <goopher@live.nl>
  • Loading branch information
GoetzGoerisch and Goopher committed Feb 28, 2025
1 parent 1ca5f12 commit f9d4f79
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions letsencrypt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.4.1

- Fix TransIP global_key handling

## 5.4.0

- Add additional arguments to certbot (dry-run, test-cert, verbose)
Expand Down
2 changes: 1 addition & 1 deletion letsencrypt/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 5.4.0
version: 5.4.1
breaking_versions: [5.3.0]
slug: letsencrypt
name: Let's Encrypt
Expand Down
6 changes: 5 additions & 1 deletion letsencrypt/rootfs/etc/cont-init.d/file-structure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ echo -e "aws_access_key_id = $(bashio::config 'dns.aws_access_key_id')\n" \
"dns_sakuracloud_api_token = $(bashio::config 'dns.sakuracloud_api_token')\n" \
"dns_simply_account_name = $(bashio::config 'dns.simply_account_name')\n" \
"dns_simply_api_key = $(bashio::config 'dns.simply_api_key')\n" \
"dns_transip_global_key = $(bashio::config 'dns.transip_global_key')\n" \
"dns_transip_key_file = /data/transip-rsa.key\n" \
"dns_transip_username = $(bashio::config 'dns.transip_username')\n" \
"dns_websupport_identifier = $(bashio::config 'dns.websupport_identifier')\n" \
Expand Down Expand Up @@ -109,6 +108,11 @@ if bashio::config.exists 'dns.transip_api_key'; then
chmod 600 /data/transip-rsa.key
fi

# TransIP global_key conditional write out to config
if bashio::config.exists 'dns.transip_global_key'; then
echo -e "dns_transip_global_key = $(bashio::config 'dns.transip_global_key')\n" >> "/data/dnsapikey"
fi

# Cleanup removed add-on options
if bashio::config.exists 'dns.cloudxns_api_key'; then
bashio::addon.option 'dns.cloudxns_api_key'
Expand Down
5 changes: 1 addition & 4 deletions letsencrypt/rootfs/etc/services.d/lets-encrypt/run
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,8 @@ elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-simply" ]; then
elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-transip" ]; then
bashio::config.require 'dns.transip_username'
bashio::config.require 'dns.transip_api_key'
if bashio::config.has_value 'dns.transip_global_key'; then
"dns_transip_global_key=$(bashio::config 'dns.transip_global_key')"
fi
if (( PROPAGATION_SECONDS < 240 )); then
bashio::log.info "Increasing DNS propagation limit for TransIP to at least 240 seconds."
bashio::log.info "Increasing DNS propagation time for TransIP to at least 240 seconds."
PROPAGATION_SECONDS=240
fi
PROVIDER_ARGUMENTS+=("--authenticator" "${DNS_PROVIDER}" "--${DNS_PROVIDER}-credentials" "/data/dnsapikey" "--${DNS_PROVIDER}-propagation-seconds" "${PROPAGATION_SECONDS}")
Expand Down

0 comments on commit f9d4f79

Please sign in to comment.