_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 '${root_domain_name}' (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."
...
@@ -341,13 +341,13 @@ _credential_check() {
...
@@ -341,13 +341,13 @@ _credential_check() {
# See notes at top of this file
# See notes at top of this file
_pleskxml_get_root_domain(){
_pleskxml_get_root_domain(){
_debug "Identifying DNS root domain for '$1' that is managed by the Plesk account."
original_full_domain_name="$1"
original_full_domain_name="$1"
root_domain_name="$1"
_debug "Identifying DNS root domain for '$original_full_domain_name' that is managed by the Plesk account."
# test if the domain as provided is valid for splitting.
# test if the domain as provided is valid for splitting.
if! _countdots "$root_domain_name";then
if! _countdots "$original_full_domain_name";then
_err "Invalid domain. The ACME domain must contain at least two parts (aa.bb) to identify a domain and tld for the TXT record."
_err "Invalid domain. The ACME domain must contain at least two parts (aa.bb) to identify a domain and tld for the TXT record."
return 1
return 1
fi
fi
...
@@ -372,6 +372,8 @@ _pleskxml_get_root_domain() {
...
@@ -372,6 +372,8 @@ _pleskxml_get_root_domain() {
# loop and test if domain, or any parent domain, is managed by Plesk
# loop and test if domain, or any parent domain, is managed by Plesk
# Loop until we don't have any '.' in the string we're testing as a candidate Plesk-managed domain
# Loop until we don't have any '.' in the string we're testing as a candidate Plesk-managed domain
root_domain_name="$original_full_domain_name"
while true;do
while true;do
_debug "Checking if '$root_domain_name' is managed by the Plesk server..."
_debug "Checking if '$root_domain_name' is managed by the Plesk server..."