mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 10:12:44 +00:00
Fixed removal of TXT record when subdomain is case-sensitive and improved debug logging
Plesk SPI return domain names always lower-case. Therefore the search for domain names in the API response must be case-insensitve. Set debug logging to the values that are reallys used for the spi calls. added comment
This commit is contained in:
parent
55a55e9f74
commit
bc7e02b47a
@ -145,32 +145,25 @@ dns_pleskxml_rm() {
|
|||||||
)"
|
)"
|
||||||
|
|
||||||
if [ -z "$reclist" ]; then
|
if [ -z "$reclist" ]; then
|
||||||
_err "No TXT records found for root domain ${root_domain_name} (Plesk domain ID ${root_domain_id}). Exiting."
|
_err "No TXT records found for root domain $fulldomain (Plesk domain ID ${root_domain_id}). Exiting."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_debug "Got list of DNS TXT records for root domain '$root_domain_name':"
|
_debug "Got list of DNS TXT records for root Plesk domain ID ${root_domain_id} of root domain $fulldomain:"
|
||||||
_debug "$reclist"
|
_debug "$reclist"
|
||||||
|
|
||||||
recline="$(
|
# Extracting the id of the TXT record for the full domain (NOT case-sensitive) and corresponding value
|
||||||
_value "$reclist" |
|
|
||||||
grep "<host>${fulldomain}.</host>" |
|
|
||||||
grep "<value>${txtvalue}</value>"
|
|
||||||
)"
|
|
||||||
|
|
||||||
_debug "Got line for <host>${fulldomain}.</host> and <value>${txtvalue}</value>:"
|
|
||||||
_debug "$recline"
|
|
||||||
|
|
||||||
recid="$(
|
recid="$(
|
||||||
_value "$recline" |
|
_value "$reclist" |
|
||||||
|
grep -i "<host>${fulldomain}.</host>" |
|
||||||
|
grep "<value>${txtvalue}</value>" |
|
||||||
sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/'
|
sed 's/^.*<id>\([0-9]\{1,\}\)<\/id>.*$/\1/'
|
||||||
)"
|
)"
|
||||||
|
|
||||||
_debug "Got id from line:"
|
_debug "Got id from line: $recid"
|
||||||
_debug "$recid"
|
|
||||||
|
|
||||||
if ! _value "$recid" | grep '^[0-9]\{1,\}$' >/dev/null; then
|
if ! _value "$recid" | grep '^[0-9]\{1,\}$' >/dev/null; then
|
||||||
_err "DNS records for root domain '${root_domain_name}' (Plesk ID ${root_domain_id}) + host '${sub_domain_name}' do not contain the TXT record '${txtvalue}'"
|
_err "DNS records for root domain '${fulldomain}.' (Plesk ID ${root_domain_id}) + host '${sub_domain_name}' do not contain the TXT record '${txtvalue}'"
|
||||||
_err "Cannot delete TXT record. Exiting."
|
_err "Cannot delete TXT record. Exiting."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user