Fixed API call for Vultr

This commit is contained in:
Eric Renfro 2023-11-01 02:39:12 -04:00
parent 76ca7315cc
commit e783086578
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -103,7 +103,7 @@ if _update_dns_vultr_check_domain "$DIP_DOMAIN"; then
-X PATCH \ -X PATCH \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer $agent_update_dns_vultr_token" \ -H "Authorization: Bearer $agent_update_dns_vultr_token" \
-d '{"name":"A", "data": "'$DIP_CUR_IP'", "ttl": 300, "priority": 0}' \ -d '{"data": "'$DIP_CUR_IP'"}' \
"https://api.vultr.com/v2/domains/${DIP_DOMAIN}/records/${DIP_RECORD_ID}" > /dev/null; "https://api.vultr.com/v2/domains/${DIP_DOMAIN}/records/${DIP_RECORD_ID}" > /dev/null;
else else
logerr "WARN: No A record exists for $DIP_RECORD" logerr "WARN: No A record exists for $DIP_RECORD"
@ -119,7 +119,7 @@ if _update_dns_vultr_check_domain "$DIP_DOMAIN"; then
-X PATCH \ -X PATCH \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer $agent_update_dns_vultr_token" \ -H "Authorization: Bearer $agent_update_dns_vultr_token" \
-d '{"name":"AAAA", "data": "'$DIP_CUR_IP'", "ttl": 300, "priority": 0}' \ -d '{"data": "'$DIP_CUR_IP'"}' \
"https://api.vultr.com/v2/domains/${DIP_DOMAIN}/records/${DIP_RECORD_ID}" > /dev/null; "https://api.vultr.com/v2/domains/${DIP_DOMAIN}/records/${DIP_RECORD_ID}" > /dev/null;
else else
logerr "WARN: No AAAA record exists for $DIP_RECORD" logerr "WARN: No AAAA record exists for $DIP_RECORD"