mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
netwatch-dns: properly check for disabled state
The property 'disabled' can be undefined, which evaluates to enabled - but is not matched by 'disabled=no'.
This commit is contained in:
parent
cb20b8c380
commit
876f8a0f82
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ $ScriptLock $0;
|
|||
:local DnsFallback [ :toarray "" ];
|
||||
:local DnsCurrent [ /ip/dns/get servers ];
|
||||
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"dns" disabled=no ] do={
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"dns" !disabled ] do={
|
||||
:local HostVal [ /tool/netwatch/get $Host ];
|
||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
|
@ -59,7 +59,7 @@ $ScriptLock $0;
|
|||
:local DohServer "";
|
||||
:local DohCurrent [ /ip/dns/get use-doh-server ];
|
||||
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"doh" disabled=no ] do={
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"doh" !disabled ] do={
|
||||
:local HostVal [ /tool/netwatch/get $Host ];
|
||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue