From f92b4be6d81879a138c201954daaf768d6de3aff Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 31 Jan 2021 13:42:33 -0500 Subject: [PATCH] Added Warnings in case DO records to not exist --- src/agents.d/update-dns-do | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/agents.d/update-dns-do b/src/agents.d/update-dns-do index d686d82..56de158 100755 --- a/src/agents.d/update-dns-do +++ b/src/agents.d/update-dns-do @@ -106,6 +106,8 @@ if agent_update_dns_do_domain=$(_update_dns_do_get_domain); then -H "Authorization: Bearer $agent_update_dns_do_token" \ -d '{"data":"'$DIP_CUR_IP'"}' \ "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 @@ -121,6 +123,8 @@ if agent_update_dns_do_domain=$(_update_dns_do_get_domain); then -H "Authorization: Bearer $agent_update_dns_do_token" \ -d '{"data":"'$DIP_CUR_IP'"}' \ "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 else