|
@ -101,6 +101,7 @@ dns_azure_add() { |
|
|
acmeRecordURI="https://management.azure.com$(printf '%s' "$_domain_id" | sed 's/\\//g')/TXT/$_sub_domain?api-version=2017-09-01" |
|
|
acmeRecordURI="https://management.azure.com$(printf '%s' "$_domain_id" | sed 's/\\//g')/TXT/$_sub_domain?api-version=2017-09-01" |
|
|
_debug "$acmeRecordURI" |
|
|
_debug "$acmeRecordURI" |
|
|
# Get existing TXT record |
|
|
# Get existing TXT record |
|
|
|
|
|
_debug "$acmeRecordURI $accesstoken" |
|
|
_azure_rest GET "$acmeRecordURI" "" "$accesstoken" |
|
|
_azure_rest GET "$acmeRecordURI" "" "$accesstoken" |
|
|
values="{\"value\":[\"$txtvalue\"]}" |
|
|
values="{\"value\":[\"$txtvalue\"]}" |
|
|
timestamp="$(_time)" |
|
|
timestamp="$(_time)" |
|
@ -126,7 +127,6 @@ dns_azure_add() { |
|
|
# Add the txtvalue TXT Record |
|
|
# Add the txtvalue TXT Record |
|
|
body="{\"properties\":{\"metadata\":{\"acmetscheck\":\"$timestamp\"},\"TTL\":10, \"TXTRecords\":[$values]}}" |
|
|
body="{\"properties\":{\"metadata\":{\"acmetscheck\":\"$timestamp\"},\"TTL\":10, \"TXTRecords\":[$values]}}" |
|
|
_azure_rest PUT "$acmeRecordURI" "$body" "$accesstoken" |
|
|
_azure_rest PUT "$acmeRecordURI" "$body" "$accesstoken" |
|
|
_debug "$acmeRecordURI $body $accesstoken" |
|
|
|
|
|
if [ "$_code" = "200" ] || [ "$_code" = '201' ]; then |
|
|
if [ "$_code" = "200" ] || [ "$_code" = '201' ]; then |
|
|
_info "validation value added" |
|
|
_info "validation value added" |
|
|
return 0 |
|
|
return 0 |
|
|