mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
netwatch-dns: match on word boundary
This commit is contained in:
@ -26,7 +26,7 @@ $ScriptLock $0;
|
||||
:local DnsFallback ({});
|
||||
:local DnsCurrent [ /ip/dns/get servers ];
|
||||
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"dns" status="up" ] do={
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"\\bdns\\b" status="up" ] do={
|
||||
:local HostVal [ /tool/netwatch/get $Host ];
|
||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
@ -61,7 +61,7 @@ $ScriptLock $0;
|
||||
:local DohCert "";
|
||||
:local DohCurrent [ /ip/dns/get use-doh-server ];
|
||||
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"doh" status="up" ] do={
|
||||
:foreach Host in=[ /tool/netwatch/find where comment~"\\bdoh\\b" status="up" ] do={
|
||||
:local HostVal [ /tool/netwatch/get $Host ];
|
||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||
|
||||
|
Reference in New Issue
Block a user