mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-04 10:15:05 +02:00
netwatch-notify: attempt to update address with working resolver only
This commit is contained in:
parent
cfb31e844c
commit
0b1bb0f2b2
1 changed files with 2 additions and 1 deletions
|
@ -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={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue