mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-10 13:15:01 +02:00
netwatch-dns: break long lines
This commit is contained in:
parent
0a45e25562
commit
447e1d99f9
1 changed files with 6 additions and 3 deletions
|
@ -48,7 +48,8 @@ $ScriptLock $0;
|
||||||
} else={
|
} else={
|
||||||
:if ([ :len $DnsFallback ] > 0) do={
|
:if ([ :len $DnsFallback ] > 0) do={
|
||||||
:if ($DnsFallback != $DnsCurrent) do={
|
:if ($DnsFallback != $DnsCurrent) do={
|
||||||
$LogPrintExit2 info $0 ("Updating DNS servers to fallback: " . [ :tostr $DnsFallback ]) false;
|
$LogPrintExit2 info $0 ("Updating DNS servers to fallback: " . \
|
||||||
|
[ :tostr $DnsFallback ]) false;
|
||||||
/ip/dns/set servers=$DnsFallback;
|
/ip/dns/set servers=$DnsFallback;
|
||||||
/ip/dns/cache/flush;
|
/ip/dns/cache/flush;
|
||||||
}
|
}
|
||||||
|
@ -62,8 +63,10 @@ $ScriptLock $0;
|
||||||
:local HostVal [ /tool/netwatch/get $Host ];
|
:local HostVal [ /tool/netwatch/get $Host ];
|
||||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||||
|
|
||||||
:if ($HostVal->"status" = "up" && $HostInfo->"doh" = true && $HostInfo->"disabled" != true && $DohServer = "") do={
|
:if ($HostVal->"status" = "up" && $HostInfo->"doh" = true && \
|
||||||
:set DohServer [ $EitherOr ($HostInfo->"doh-url") ("https://" . $HostVal->"host" . "/dns-query") ];
|
$HostInfo->"disabled" != true && $DohServer = "") do={
|
||||||
|
:set DohServer [ $EitherOr ($HostInfo->"doh-url") \
|
||||||
|
("https://" . $HostVal->"host" . "/dns-query") ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue