Browse Source

Updated PUT request to hold only fqdn domain name values#

pull/6178/head
peterv99 3 weeks ago
parent
commit
35f3b7088d
  1. 4
      dnsapi/dns_mijn_host.sh

4
dnsapi/dns_mijn_host.sh

@ -39,7 +39,7 @@ dns_mijn_host_add() {
_debug "Add TXT record" _debug "Add TXT record"
# Build the payload for the API # Build the payload for the API
data="{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"ttl\":120}"
data="{\"type\":\"TXT\",\"name\":\"$fulldomain.\",\"value\":\"$txtvalue\",\"ttl\":120}"
export _H1="API-Key: $MIJN_HOST_API_KEY" export _H1="API-Key: $MIJN_HOST_API_KEY"
export _H2="Content-Type: application/json" export _H2="Content-Type: application/json"
@ -56,7 +56,7 @@ dns_mijn_host_add() {
# Updating the records # Updating the records
updated_records=$(echo "$records" | sed -E "s/\]( *$)/,$data\]/") updated_records=$(echo "$records" | sed -E "s/\]( *$)/,$data\]/")
_debug "Updated records" "$updatedrecords"
_debug "Updated records" "$updated_records"
# data # data
data="{\"records\": $updated_records}" data="{\"records\": $updated_records}"

Loading…
Cancel
Save