|
@ -69,7 +69,6 @@ dns_arvancdn_rm() { |
|
|
#_zone=$(echo "${_zone}" | sed "s/.*\.\.//") |
|
|
#_zone=$(echo "${_zone}" | sed "s/.*\.\.//") |
|
|
_zone=${_zone/*\.\./} |
|
|
_zone=${_zone/*\.\./} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_record_id=$(_record_get_id "${_zone}" "${_challenge}") |
|
|
_record_id=$(_record_get_id "${_zone}" "${_challenge}") |
|
|
|
|
|
|
|
|
_record_remove "${_zone}" "${_record_id}" |
|
|
_record_remove "${_zone}" "${_record_id}" |
|
@ -90,7 +89,7 @@ _get_root() { |
|
|
|
|
|
|
|
|
_response=$(_get "${ARVAN_CDN_API}/domains") |
|
|
_response=$(_get "${ARVAN_CDN_API}/domains") |
|
|
#_domains_list=( $( echo "${_response}" | grep -Poe '"domain":"[^"]*"' | sed 's/"domain":"//' | sed 's/"//') ) |
|
|
#_domains_list=( $( echo "${_response}" | grep -Poe '"domain":"[^"]*"' | sed 's/"domain":"//' | sed 's/"//') ) |
|
|
read -r -a _domains_list < <( echo "${_response}" | grep -Poe '"domain":"[^"]*"' | sed 's/"domain":"//' | sed 's/"//') |
|
|
|
|
|
|
|
|
read -r -a _domains_list < <(echo "${_response}" | grep -Poe '"domain":"[^"]*"' | sed 's/"domain":"//' | sed 's/"//') |
|
|
|
|
|
|
|
|
_debug2 "_get_root(): reponse ${_response}" |
|
|
_debug2 "_get_root(): reponse ${_response}" |
|
|
_debug2 "_get_root(): domains list ${_domains_list[*]}" |
|
|
_debug2 "_get_root(): domains list ${_domains_list[*]}" |
|
@ -143,7 +142,6 @@ _record_get_id() { |
|
|
_response=$(_get "${ARVAN_CDN_API}/domains/${_zone}/dns-records/?type=txt\&search=${_challenge}" | _json_decode | _normalizeJson | grep -Eo '"id":.*?,"value":\{"text":".*?"\}' | sed 's/"id":"\([^"]*\)".*/\1/') |
|
|
_response=$(_get "${ARVAN_CDN_API}/domains/${_zone}/dns-records/?type=txt\&search=${_challenge}" | _json_decode | _normalizeJson | grep -Eo '"id":.*?,"value":\{"text":".*?"\}' | sed 's/"id":"\([^"]*\)".*/\1/') |
|
|
_debug2 "_record_get_id(): ${_response}" |
|
|
_debug2 "_record_get_id(): ${_response}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "${_response}" |
|
|
echo "${_response}" |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|