aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-05-06 15:10:33 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-05-06 15:33:52 +0200
commit0b1bb0f2b2b388c3fb591e1872c18779bf034415 (patch)
treeda235305839c61f5c188601a0c2ec5180f1a4d86
parentcfb31e844c39089046de1fc7021d5dedef14c145 (diff)
netwatch-notify: attempt to update address with working resolver only
-rw-r--r--netwatch-notify3
1 files changed, 2 insertions, 1 deletions
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={