@ -12,12 +12,10 @@
# https://docs.plesk.com/en-US/12.5/api-rpc/about-xml-api.28709
# https://docs.plesk.com/en-US/12.5/api-rpc/about-xml-api.28709
# and more specifically: https://docs.plesk.com/en-US/12.5/api-rpc/reference.28784
# and more specifically: https://docs.plesk.com/en-US/12.5/api-rpc/reference.28784
# This may be needed if the DNS provider doesn't make the standard Plesk API available to a user.
# This may be needed if the DNS provider doesn't make the standard Plesk API available to a user.
# As a result, Plesk can't be configured using usual means or RFC1236. But the XML API is often
# As a result, Plesk can't be configured using usual means or RFC1236. But the XML API is often
# still left accessible, and is well documented, so it can be used instead, for acme.sh purposes.
# still left accessible, and is well documented, so it can be used instead, for acme.sh purposes.
# API NOTES:
# API NOTES:
# 1) The API uses a user/password combination. It should therefore require cURL over HTTPS
# 1) The API uses a user/password combination. It should therefore require cURL over HTTPS
@ -33,7 +31,6 @@
# 3) The API references domains by a domain ID, when manipulating records. So the code must
# 3) The API references domains by a domain ID, when manipulating records. So the code must
# initially convert domain names (string) to Plesk domain IDs (numeric).
# initially convert domain names (string) to Plesk domain IDs (numeric).
# REQUIRED VARIABLES:
# REQUIRED VARIABLES:
# You need to provide the Plesk URI and login (username and password) as follows:
# You need to provide the Plesk URI and login (username and password) as follows:
@ -43,7 +40,6 @@
# export pleskxml_user="johndoe"
# export pleskxml_user="johndoe"
# export pleskxml_pass="XXXXX"
# export pleskxml_pass="XXXXX"
# OPTIONAL VARIABLES:
# OPTIONAL VARIABLES:
# To use an insecure Plesk URI, set the following:
# To use an insecure Plesk URI, set the following:
@ -58,7 +54,6 @@
# By design if DBG level is 9 for a message, it is ALWAYS shown, this is used for _info and _err
# By design if DBG level is 9 for a message, it is ALWAYS shown, this is used for _info and _err
# export pleskxml_debug_min_level=2
# export pleskxml_debug_min_level=2
############ Before anything else, define dedug functions to be sure they are detected even if while testing #####################
############ Before anything else, define dedug functions to be sure they are detected even if while testing #####################
_DBG_EARLY_CHECK_MODE( ) {
_DBG_EARLY_CHECK_MODE( ) {
@ -81,37 +76,28 @@ _DBG_EARLY_CHECK_MODE() {
_DBG( ) {
_DBG( ) {
if [ " $1 " -eq 9 ] || ( [ " $_pleskxml_DBG_LEVEL " -gt 0 ] && [ " $1 " -ge " $_pleskxml_DBG_LEVEL " ] ) ; then
if [ " $1 " -eq 9 ] || ( [ " $_pleskxml_DBG_LEVEL " -gt 0 ] && [ " $1 " -ge " $_pleskxml_DBG_LEVEL " ] ) ; then
case $1 in
case $1 in
1) _pleskxml_severity = 'INFO'
; ;
2) _pleskxml_severity = 'WARN'
; ;
3) _pleskxml_severity = 'ERR'
; ;
9) _pleskxml_severity = '_ACME.SH'
; ;
1) _pleskxml_severity = 'INFO' ; ;
2) _pleskxml_severity = 'WARN' ; ;
3) _pleskxml_severity = 'ERR' ; ;
9) _pleskxml_severity = '_ACME.SH' ; ;
esac
esac
_pleskxml_DBG_COUNT = $(( _pleskxml_DBG_COUNT + 1 ))
_pleskxml_DBG_COUNT = $(( _pleskxml_DBG_COUNT + 1 ))
printf '%04d DEBUG [%s]:\n%s\n\n' " $_pleskxml_DBG_COUNT " " $_pleskxml_severity " " $2 "
printf '%04d DEBUG [%s]:\n%s\n\n' " $_pleskxml_DBG_COUNT " " $_pleskxml_severity " " $2 "
fi
fi
}
}
# arg1 = severity level (1=least serious, 3=most serious)
# arg1 = severity level (1=least serious, 3=most serious)
# arg2 = message (vardump will be appended)
# arg2 = message (vardump will be appended)
_DBG_VARDUMP( ) {
_DBG_VARDUMP( ) {
_DBG " $1 " " $( printf '%s: 1st lines of current defined variables are now:\n%s\n\n' " ${ 2 :- NO_FURTHER_MSG } " " $( set | grep '_pleskxml' | sort) " ) "
_DBG " $1 " " $( printf '%s: 1st lines of current defined variables are now:\n%s\n\n' " ${ 2 :- NO_FURTHER_MSG } " " $( set | grep '_pleskxml' | sort) " ) "
}
}
_DBG_ERR_TRAP( ) {
_DBG_ERR_TRAP( ) {
echo " Error on line $1 "
echo " Error on line $1 "
}
}
############ Start of module itself ##############################
############ Start of module itself ##############################
# Trap errors and perform early check for debug mode.
# Trap errors and perform early check for debug mode.
# Traps currently ignored
# Traps currently ignored
@ -202,7 +188,6 @@ dns_pleskxml_add() {
_DBG_VARDUMP 2 'Call has returned'
_DBG_VARDUMP 2 'Call has returned'
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
_err " $_pleskxml_errors "
_err " $_pleskxml_errors "
@ -237,8 +222,6 @@ dns_pleskxml_add() {
return 0
return 0
}
}
# Usage: dns_pleskxml_rm _acme-challenge.domain.org "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
# Usage: dns_pleskxml_rm _acme-challenge.domain.org "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
# Remove a TXT record after validation
# Remove a TXT record after validation
@ -318,7 +301,6 @@ dns_pleskxml_rm() {
#################### Define private functions ##################################
#################### Define private functions ##################################
#################### Plesk related functions
#################### Plesk related functions
_pleskxml_get_variables( ) {
_pleskxml_get_variables( ) {
@ -354,7 +336,6 @@ _pleskxml_get_variables() {
_pleskxml_uri_prefix_match = 'https://'
_pleskxml_uri_prefix_match = 'https://'
fi
fi
if printf '%s' " ${ pleskxml_uri :- } " | grep -qiE " ^ ${ _pleskxml_uri_prefix_match } " '([a-z0-9][a-z0-9.:-]*|\[[a-f0-9][a-f0-9.:]+\])(:[0-9]{1,5})?(/|$)' ; then
if printf '%s' " ${ pleskxml_uri :- } " | grep -qiE " ^ ${ _pleskxml_uri_prefix_match } " '([a-z0-9][a-z0-9.:-]*|\[[a-f0-9][a-f0-9.:]+\])(:[0-9]{1,5})?(/|$)' ; then
# URI is "valid enough" to use, and uses https if this is mandatory (= pleskxml_allow_insecure_uri wasn't set)
# URI is "valid enough" to use, and uses https if this is mandatory (= pleskxml_allow_insecure_uri wasn't set)
_pleskxml_uri = " $pleskxml_uri "
_pleskxml_uri = " $pleskxml_uri "
@ -390,15 +371,12 @@ _pleskxml_get_variables() {
fi
fi
}
}
# Build a cURL request for the Plesk API
# Build a cURL request for the Plesk API
# ARGS:
# ARGS:
# First arg is a Plesk XML API template. Further args (up to 3 items) are substituted into it via printf
# First arg is a Plesk XML API template. Further args (up to 3 items) are substituted into it via printf
_pleskxml_api_request( ) {
_pleskxml_api_request( ) {
_DBG 2 " Entered _pleskxml_api_request( $* ), to make an XML request. ${ _pleskxml_newline } arg1=^ $1 ^ ${ _pleskxml_newline } arg2=^ $2 ^ ${ _pleskxml_newline } arg3=^ $3 ^ ${ _pleskxml_newline } arg4=^ $4 ^ "
_DBG 2 " Entered _pleskxml_api_request( $* ), to make an XML request. ${ _pleskxml_newline } arg1=^ $1 ^ ${ _pleskxml_newline } arg2=^ $2 ^ ${ _pleskxml_newline } arg3=^ $3 ^ ${ _pleskxml_newline } arg4=^ $4 ^ "
_pleskxml_errors = ''
_pleskxml_errors = ''
@ -458,9 +436,9 @@ _pleskxml_api_request() {
# tr -d '\n' \
# tr -d '\n' \
# )"
# )"
_pleskxml_result = " $( printf '%s' " $_pleskxml_prettyprint_result " | \
sed -E 's/(^[[:space:]]+|[[:space:]]+$)//g' | \
tr -d '\n' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_prettyprint_result " \
| sed -E 's/(^[[:space:]]+|[[:space:]]+$)//g' \
| tr -d '\n'
) "
) "
_DBG_VARDUMP 2 'cURL succeeded, valid cURL response obtained'
_DBG_VARDUMP 2 'cURL succeeded, valid cURL response obtained'
@ -479,8 +457,8 @@ _pleskxml_api_request() {
return 1
return 1
else
else
# So far so good. Strip the <?xml> and <packet>...</packet> tags and continue
# So far so good. Strip the <?xml> and <packet>...</packet> tags and continue
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/^<\?xml version[^>]+><packet version[^>]+>(.*)<\/packet>$/\1/' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/^<\?xml version[^>]+><packet version[^>]+>(.*)<\/packet>$/\1/'
) "
) "
fi
fi
@ -489,7 +467,6 @@ _pleskxml_api_request() {
# <system> section found anywhere in response?
# <system> section found anywhere in response?
# This usually means some kind of basic API error such as login failure, bad XML request, etc
# This usually means some kind of basic API error such as login failure, bad XML request, etc
if printf '%s' " $_pleskxml_result " | grep -qiE '<system>.*</system>' ; then
if printf '%s' " $_pleskxml_result " | grep -qiE '<system>.*</system>' ; then
# Error - shouldn't contain <system>...</system>. Abort
# Error - shouldn't contain <system>...</system>. Abort
_pleskxml_errors = 'Error when querying Plesk XML API. The result contained a <system> tag.\nThis usually indicates an invalid login, badly formatted API request or other error. The response was:\n' " $_pleskxml_prettyprint_result " '\n'
_pleskxml_errors = 'Error when querying Plesk XML API. The result contained a <system> tag.\nThis usually indicates an invalid login, badly formatted API request or other error. The response was:\n' " $_pleskxml_prettyprint_result " '\n'
@ -497,10 +474,8 @@ _pleskxml_api_request() {
return 1
return 1
fi
fi
_DBG 2 'Checking 1 or >=1 <result> tag (or tags) found, each containing ' status:ok'...'
_DBG 2 'Checking 1 or >=1 <result> tag (or tags) found, each containing ' status:ok'...'
# Check results section. Most commands only have one results section.
# Check results section. Most commands only have one results section.
# But some (i.e., get all DNS records for a domain) have many results sections,
# But some (i.e., get all DNS records for a domain) have many results sections,
# and we will need to check each <results>...</results> section separately.
# and we will need to check each <results>...</results> section separately.
@ -520,10 +495,10 @@ _pleskxml_api_request() {
_DBG 2 'Found at least 1 <result> section. Splitting each result section to a separate line'
_DBG 2 'Found at least 1 <result> section. Splitting each result section to a separate line'
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed " s/<result>/\\ ${ _pleskxml_newline } <result>/g " | \
sed " s/<\/result>/<\/result>\\ ${ _pleskxml_newline } /g " | \
grep '<result>' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed " s/<result>/\\ ${ _pleskxml_newline } <result>/g " \
| sed " s/<\/result>/<\/result>\\ ${ _pleskxml_newline } /g " \
| grep '<result>'
) "
) "
# Detect and abort if there are >1 <result> sections and we're ponly expecting 1 section.
# Detect and abort if there are >1 <result> sections and we're ponly expecting 1 section.
@ -551,7 +526,6 @@ _pleskxml_api_request() {
# _pleskxml_line *should* contain a single result section.
# _pleskxml_line *should* contain a single result section.
# Check this is correct.
# Check this is correct.
# _DBG "Checking a <result> section... content is ${_pleskxml_line}"
# _DBG "Checking a <result> section... content is ${_pleskxml_line}"
if printf '%s' " $_pleskxml_line " | grep -qiEv '^<result>.*</result>$' ; then
if printf '%s' " $_pleskxml_line " | grep -qiEv '^<result>.*</result>$' ; then
@ -591,16 +565,16 @@ EOL
_DBG 2 "All results lines had status:ok. Exiting loop, and removing all <status>ok</status> tags now they've been checked"
_DBG 2 "All results lines had status:ok. Exiting loop, and removing all <status>ok</status> tags now they've been checked"
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/<status>ok<\/status>//g' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/<status>ok<\/status>//g'
) "
) "
# Result is OK. Remove any redundant self-closing tags, and <data> or </data> tags, and exit
# Result is OK. Remove any redundant self-closing tags, and <data> or </data> tags, and exit
_DBG 2 'Now removing any self-closing tags, or <data>...</data> tags'
_DBG 2 'Now removing any self-closing tags, or <data>...</data> tags'
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/(<[a-zA-Z0-9._-]+[[:space:]]*\/>|<\/?data\/?>)//g' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/(<[a-zA-Z0-9._-]+[[:space:]]*\/>|<\/?data\/?>)//g'
) "
) "
_DBG 2 " About to exit API function. Result = ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
_DBG 2 " About to exit API function. Result = ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
@ -611,9 +585,6 @@ EOL
}
}
_pleskxml_get_domain_ID( ) {
_pleskxml_get_domain_ID( ) {
_DBG 2 " Entered Plesk get_domain_ID( $* ), to get the domain's Plesk ID. "
_DBG 2 " Entered Plesk get_domain_ID( $* ), to get the domain's Plesk ID. "
@ -652,8 +623,8 @@ _pleskxml_get_domain_ID() {
return 1
return 1
else
else
# So far so good. Remove the <result>...</result> section and continue
# So far so good. Remove the <result>...</result> section and continue
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/(^<result>|<\/result>$)//g' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/(^<result>|<\/result>$)//g'
) "
) "
fi
fi
@ -673,8 +644,8 @@ _pleskxml_get_domain_ID() {
return 1
return 1
else
else
# So far so good. Remove the <filter-id>...</filter-id> section and continue
# So far so good. Remove the <filter-id>...</filter-id> section and continue
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed " s/<filter-id> $1 <\/filter-id>// " \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed " s/<filter-id> $1 <\/filter-id>// "
) "
) "
fi
fi
@ -691,8 +662,8 @@ _pleskxml_get_domain_ID() {
# SUCCESS! Remove the surrounding <id> tag and return the value!
# SUCCESS! Remove the surrounding <id> tag and return the value!
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/^<id>([0-9]+)<\/id>$/\1/' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/^<id>([0-9]+)<\/id>$/\1/'
) "
) "
_DBG_VARDUMP 2 'SUCCESSFULLY exiting Plesk get_domain_ID'
_DBG_VARDUMP 2 'SUCCESSFULLY exiting Plesk get_domain_ID'
@ -701,7 +672,6 @@ _pleskxml_get_domain_ID() {
}
}
# 1st arg is the domain ID
# 1st arg is the domain ID
# 2nd arg (optional) is the TYPE of arg(s) to keep
# 2nd arg (optional) is the TYPE of arg(s) to keep
# format = valid regex WITHOUT ^ or $, such as TXT, or (A|AAAA|CNAME)
# format = valid regex WITHOUT ^ or $, such as TXT, or (A|AAAA|CNAME)
@ -720,7 +690,6 @@ _pleskxml_get_dns_records() {
_DBG 2 'Returned from API request, now back in get_txt_records()'
_DBG 2 'Returned from API request, now back in get_txt_records()'
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
_DBG 2 " $_pleskxml_errors "
_DBG 2 " $_pleskxml_errors "
@ -733,8 +702,8 @@ _pleskxml_get_dns_records() {
_DBG 2 " Full DNS records were: ${ _pleskxml_newline } ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
_DBG 2 " Full DNS records were: ${ _pleskxml_newline } ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
if [ -n " ${ 2 :- } " ] ; then
if [ -n " ${ 2 :- } " ] ; then
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
grep " <type> $2 </type> " \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| grep " <type> $2 </type> "
) "
) "
_DBG 2 " Filtered relevant DNS records. Records to be returned are: ${ _pleskxml_newline } ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
_DBG 2 " Filtered relevant DNS records. Records to be returned are: ${ _pleskxml_newline } ${ _pleskxml_newline } ' ${ _pleskxml_result } ' "
else
else
@ -745,8 +714,6 @@ _pleskxml_get_dns_records() {
return 0
return 0
}
}
_pleskxml_add_txt_record( ) {
_pleskxml_add_txt_record( ) {
_DBG 2 " Entered Plesk _pleskxml_add_txt_record( $* ) "
_DBG 2 " Entered Plesk _pleskxml_add_txt_record( $* ) "
@ -781,8 +748,8 @@ _pleskxml_add_txt_record() {
# SUCCESS! Remove the surrounding <result><id> tags and return the value!
# SUCCESS! Remove the surrounding <result><id> tags and return the value!
# (although we don't actually use it!
# (although we don't actually use it!
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E " s/^<result><id>([0-9]+)<\/id><\/result> $/\1/ " \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E " s/^<result><id>([0-9]+)<\/id><\/result> $/\1/ "
) "
) "
_DBG_VARDUMP 2 'SUCCESSFULLY exiting Plesk _pleskxml_add_txt_record'
_DBG_VARDUMP 2 'SUCCESSFULLY exiting Plesk _pleskxml_add_txt_record'
@ -816,13 +783,11 @@ _pleskxml_rmv_dns_record() {
return 0
return 0
}
}
# 1st arg = domain ID
# 1st arg = domain ID
# 2nd arg = host that the record exists for
# 2nd arg = host that the record exists for
# 3rd arg = value of TXT record string to be found and removed
# 3rd arg = value of TXT record string to be found and removed
_pleskxml_rmv_txt_record( ) {
_pleskxml_rmv_txt_record( ) {
_DBG 2 " Entered Plesk _pleskxml_rmv_dns_TXT_record( $* ). Getting DNS TXT records for the domain ID "
_DBG 2 " Entered Plesk _pleskxml_rmv_dns_TXT_record( $* ). Getting DNS TXT records for the domain ID "
_pleskxml_get_dns_records " $1 " 'TXT'
_pleskxml_get_dns_records " $1 " 'TXT'
@ -831,7 +796,6 @@ _pleskxml_rmv_txt_record() {
_DBG 2 'Returned from API request, now back in rmv_txt_record()'
_DBG 2 'Returned from API request, now back in rmv_txt_record()'
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
if [ $_pleskxml_retcode -ne 0 ] || [ " $_pleskxml_errors " != '' ] || [ " $_pleskxml_result " = '' ] ; then
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
# Really, just testing return code should be enough, based on above code, but let's go "all-in" and test all variables returned
_DBG 2 " $_pleskxml_errors "
_DBG 2 " $_pleskxml_errors "
@ -844,11 +808,11 @@ _pleskxml_rmv_txt_record() {
_DBG 2 " Filters to apply (as literal strings): ${ _pleskxml_newline } '<host> ${ 2 :- <NON_MATCHING_GARBAGE> } .' ${ _pleskxml_newline } '<value> ${ 3 :- <NON_MATCHING_GARBAGE> } </value>' "
_DBG 2 " Filters to apply (as literal strings): ${ _pleskxml_newline } '<host> ${ 2 :- <NON_MATCHING_GARBAGE> } .' ${ _pleskxml_newline } '<value> ${ 3 :- <NON_MATCHING_GARBAGE> } </value>' "
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
grep -F " <host> ${ 2 :- <NON_MATCHING_GARBAGE> } . " | \
grep -F " <value> ${ 3 :- <NON_MATCHING_GARBAGE> } </value> " | \
sed -E 's/(^[[:space:]]+|[[:space:]]+$)//g' | \
tr -d '\n' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| grep -F " <host> ${ 2 :- <NON_MATCHING_GARBAGE> } . " \
| grep -F " <value> ${ 3 :- <NON_MATCHING_GARBAGE> } </value> " \
| sed -E 's/(^[[:space:]]+|[[:space:]]+$)//g' \
32m | tr -d '\n'
) "
) "
# Run 2 separate GREP filters, because the host and value order isn't mandatory in the API return data
# Run 2 separate GREP filters, because the host and value order isn't mandatory in the API return data
# ands this avoids regex and escaping which is easier
# ands this avoids regex and escaping which is easier
@ -873,8 +837,8 @@ _pleskxml_rmv_txt_record() {
# If we get here, there was a single TXT record match, so we delete it.
# If we get here, there was a single TXT record match, so we delete it.
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " | \
sed -E 's/^.*<id>([0-9]+)<\/id>.*$/\1/' \
_pleskxml_result = " $( printf '%s' " $_pleskxml_result " \
| sed -E 's/^.*<id>([0-9]+)<\/id>.*$/\1/'
) "
) "
_DBG 2 " A unique matching DNS TXT record was found, with Plesk record ID = ' $_pleskxml_result '. Calling API to delete this record. "
_DBG 2 " A unique matching DNS TXT record was found, with Plesk record ID = ' $_pleskxml_result '. Calling API to delete this record. "
@ -895,12 +859,10 @@ _pleskxml_rmv_txt_record() {
return 0
return 0
}
}
exit
exit
# ---------------------- TEST CODE ------------------------------
# ---------------------- TEST CODE ------------------------------
# defined by user
# defined by user
pleskxml_uri = "https://plesk.XXXXX.net:8443/enterprise/control/agent.php"
pleskxml_uri = "https://plesk.XXXXX.net:8443/enterprise/control/agent.php"
pleskxml_user = "XXXXX"
pleskxml_user = "XXXXX"