mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 13:31:18 +00:00
migrate the legacy ACMEDNS_UPDATE_URL from the account conf (#3899)
This commit is contained in:
1 parent
cabe432539
commit
7b6d96387c
1 file changed
+10
@@ -37,6 +37,16 @@ dns_acmedns_add() {
|
|||||||
ACMEDNS_PASSWORD="${ACMEDNS_PASSWORD:-$(_readdomainconf ACMEDNS_PASSWORD)}"
|
ACMEDNS_PASSWORD="${ACMEDNS_PASSWORD:-$(_readdomainconf ACMEDNS_PASSWORD)}"
|
||||||
ACMEDNS_SUBDOMAIN="${ACMEDNS_SUBDOMAIN:-$(_readdomainconf ACMEDNS_SUBDOMAIN)}"
|
ACMEDNS_SUBDOMAIN="${ACMEDNS_SUBDOMAIN:-$(_readdomainconf ACMEDNS_SUBDOMAIN)}"
|
||||||
|
|
||||||
|
#for compatibility: old versions stored ACMEDNS_UPDATE_URL in the account
|
||||||
|
#conf (issue 3899). Do not clear it here: it must stay available for the
|
||||||
|
#other domains that have not migrated to their domain conf yet.
|
||||||
|
if [ -z "$ACMEDNS_BASE_URL" ]; then
|
||||||
|
_acmedns_update_url="$(_readaccountconf_mutable ACMEDNS_UPDATE_URL)"
|
||||||
|
if [ "$_acmedns_update_url" ]; then
|
||||||
|
ACMEDNS_BASE_URL="$(echo "$_acmedns_update_url" | sed 's#/update$##')"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$ACMEDNS_BASE_URL" = "" ]; then
|
if [ "$ACMEDNS_BASE_URL" = "" ]; then
|
||||||
ACMEDNS_BASE_URL="https://auth.acme-dns.io"
|
ACMEDNS_BASE_URL="https://auth.acme-dns.io"
|
||||||
fi
|
fi
|
||||||
|
|||||||