diff options
author | Christian Hesse <mail@eworm.de> | 2022-07-11 10:31:45 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-07-11 10:41:51 +0200 |
commit | 876f8a0f8211d0bbaf04b2117986a50d854052c9 (patch) | |
tree | 1ac19be69c1516475a8a587643a8696c83d14e6d /netwatch-dns | |
parent | cb20b8c3807cbdd840d4017f466e1e82e3a9b8a5 (diff) |
netwatch-dns: properly check for disabled state
The property 'disabled' can be undefined, which evaluates to
enabled - but is not matched by 'disabled=no'.
Diffstat (limited to 'netwatch-dns')
-rw-r--r-- | netwatch-dns | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netwatch-dns b/netwatch-dns index 67e0408..82a8599 100644 --- a/netwatch-dns +++ b/netwatch-dns @@ -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") ]; |