From 0b1bb0f2b2b388c3fb591e1872c18779bf034415 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 6 May 2021 15:10:33 +0200 Subject: netwatch-notify: attempt to update address with working resolver only --- netwatch-notify | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'netwatch-notify') diff --git a/netwatch-notify b/netwatch-notify index 50441a9..3d0bd91 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -12,6 +12,7 @@ :global NetwatchNotify; +:global DNSIsResolving; :global IfThenElse; :global LogPrintExit2; :global ParseKeyValueStore; @@ -33,7 +34,7 @@ :set $Metric ($NetwatchNotify->$HostName); } - :if ([ :typeof ($HostInfo->"resolve") ] = "str") do={ + :if ([ :typeof ($HostInfo->"resolve") ] = "str" && [ $DNSIsResolving ] = true) do={ :do { :local Resolve [ :resolve ($HostInfo->"resolve") ]; :if ($Resolve != $HostVal->"host") do={ -- cgit v1.2.3-70-g09d2