Added Warnings in case DO records to not exist

This commit is contained in:
Eric Renfro 2021-01-31 13:42:33 -05:00
parent 8fb399ad68
commit f92b4be6d8
Signed by untrusted user who does not match committer: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -106,6 +106,8 @@ if agent_update_dns_do_domain=$(_update_dns_do_get_domain); then
-H "Authorization: Bearer $agent_update_dns_do_token" \ -H "Authorization: Bearer $agent_update_dns_do_token" \
-d '{"data":"'$DIP_CUR_IP'"}' \ -d '{"data":"'$DIP_CUR_IP'"}' \
"https://api.digitalocean.com/v2/domains/$agent_update_dns_do_domain/records/$record_id4" > /dev/null; "https://api.digitalocean.com/v2/domains/$agent_update_dns_do_domain/records/$record_id4" > /dev/null;
else
logerr "WARN: No A record exists for $agent_update_dns_do_domain"
fi fi
fi fi
@ -121,6 +123,8 @@ if agent_update_dns_do_domain=$(_update_dns_do_get_domain); then
-H "Authorization: Bearer $agent_update_dns_do_token" \ -H "Authorization: Bearer $agent_update_dns_do_token" \
-d '{"data":"'$DIP_CUR_IP'"}' \ -d '{"data":"'$DIP_CUR_IP'"}' \
"https://api.digitalocean.com/v2/domains/$agent_update_dns_do_domain/records/$record_id6" > /dev/null; "https://api.digitalocean.com/v2/domains/$agent_update_dns_do_domain/records/$record_id6" > /dev/null;
else
logerr "WARN: No AAAA record exists for $agent_update_dns_do_domain"
fi fi
fi fi
else else