mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-19 09:09:11 +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 NetwatchNotify;
|
||||||
|
|
||||||
|
:global DNSIsResolving;
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
:set $Metric ($NetwatchNotify->$HostName);
|
:set $Metric ($NetwatchNotify->$HostName);
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :typeof ($HostInfo->"resolve") ] = "str") do={
|
:if ([ :typeof ($HostInfo->"resolve") ] = "str" && [ $DNSIsResolving ] = true) do={
|
||||||
:do {
|
:do {
|
||||||
:local Resolve [ :resolve ($HostInfo->"resolve") ];
|
:local Resolve [ :resolve ($HostInfo->"resolve") ];
|
||||||
:if ($Resolve != $HostVal->"host") do={
|
:if ($Resolve != $HostVal->"host") do={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue