From e93422670f1d0b93436900473f216908545f9d61 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 May 2026 16:25:14 +0200 Subject: [PATCH] netwatch-dns: use :toarray's new delimiter= to split cert names The new delimiter= parameter for :toarray with introduced in RouterOS 7.21. --- doc/netwatch-dns.md | 2 +- netwatch-dns.rsc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/netwatch-dns.md b/doc/netwatch-dns.md index c80b819b..3aafd5d6 100644 --- a/doc/netwatch-dns.md +++ b/doc/netwatch-dns.md @@ -4,7 +4,7 @@ Manage DNS and DoH servers from netwatch [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) -[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/) +[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 7c6a7b5b..ac7ce0ac 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2022-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # requires device-mode, fetch # # monitor and manage dns/doh with netwatch @@ -17,7 +17,6 @@ :local ScriptName [ :jobname ]; :global CertificateAvailable; - :global CharacterReplace; :global EitherOr; :global IsDNSResolving; :global LogPrint; @@ -104,7 +103,7 @@ } :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 ([ $CertificateAvailable $DohCert "fetch" ] = false || \ [ $CertificateAvailable $DohCert "dns" ] = false) do={