mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-06-04 09:42:37 +00:00
netwatch-dns: use :toarray's new delimiter= to split cert names
The new delimiter= parameter for :toarray with introduced in RouterOS 7.21.
This commit is contained in:
parent
dfdfdd69c2
commit
e93422670f
2 changed files with 3 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ Manage DNS and DoH servers from netwatch
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
# requires device-mode, fetch
|
# requires device-mode, fetch
|
||||||
#
|
#
|
||||||
# monitor and manage dns/doh with netwatch
|
# monitor and manage dns/doh with netwatch
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
:global CharacterReplace;
|
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global IsDNSResolving;
|
:global IsDNSResolving;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -104,7 +103,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach DohServer in=$DohServers do={
|
:foreach DohServer in=$DohServers do={
|
||||||
:foreach DohCert in=[ :toarray [ $CharacterReplace ($DohServer->"doh-cert") ":" "," ] ] do={
|
:foreach DohCert in=[ :toarray delimiter=":" ($DohServer->"doh-cert") ] do={
|
||||||
:if ([ :len $DohCert ] > 0) do={
|
:if ([ :len $DohCert ] > 0) do={
|
||||||
:if ([ $CertificateAvailable $DohCert "fetch" ] = false || \
|
:if ([ $CertificateAvailable $DohCert "fetch" ] = false || \
|
||||||
[ $CertificateAvailable $DohCert "dns" ] = false) do={
|
[ $CertificateAvailable $DohCert "dns" ] = false) do={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue