From 0f3df0c75dfd7cd0ac65a1ffe49d6dd9e18ef72a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 01/34] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 779e246..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -RouterOS Scripts :: __TITLE__ - + +RouterOS Scripts :: __TITLE__ diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 507445b..eb00492 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Logo Color Changer + + +RouterOS Scripts :: Logo Color Changer + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +34,4 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

- - + diff --git a/contrib/notification.html b/contrib/notification.html index b7d6764..472ce48 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Notification Generator + + +RouterOS Scripts :: Notification Generator + - - + -

RouterOS-Scripts Notification Generator

+

Notification Generator

@@ -31,5 +29,4 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

- - + From de97ed6f19bf751873032e011ec24263acd8a4e6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 02/34] contrib/{logo-color,notification}: add navigation structure --- contrib/logo-color.html | 6 ++++++ contrib/notification.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index eb00492..8ee1ba9 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -8,6 +8,8 @@

Logo Color Changer

+

⬅️ Go back to main README

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

@@ -34,4 +36,8 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

diff --git a/contrib/notification.html b/contrib/notification.html index 472ce48..3bc86fc 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -8,6 +8,8 @@

Notification Generator

+

⬅️ Go back to main README

+
@@ -29,4 +31,8 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

From 29a82d1a42d64969d5d8cad19ec3778e2a8390cb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:47 +0100 Subject: [PATCH 03/34] README: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 529bb4c..b77538d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,10 @@ download the certificates. > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the > trust for these builtin trust anchors: -> `/certificate/settings/set builtin-trust-anchors=trusted;` +> `/certificate/settings/set builtin-trust-anchors=trusted;` +> With RouterOS 7.21 the functionality was changed. Set this at minimum, +> but make sure not to drop other targets: +> `/certificate/settings/set builtin-trust-store=fetch;` If you intend to download the scripts from a different location (for example from github.com) install the corresponding From 2e1d59721f06316ba6b139375a6467c7870063cf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 04/34] contrib/notification: update date format --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index 3bc86fc..c86450c 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,7 +16,7 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 and may be obsolete.

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

✂️ The message was too long and has been truncated, cut off 13%!

@@ -25,7 +25,7 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

Then right-click, click "Take Screenshot" and finally select the From f7e9f529d0c1519ffaf8ef4389007ec796c8f0aa Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:38:31 +0100 Subject: [PATCH 05/34] INITIAL-COMMANDS: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- INITIAL-COMMANDS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/INITIAL-COMMANDS.md b/INITIAL-COMMANDS.md index 40f609b..6e70b66 100644 --- a/INITIAL-COMMANDS.md +++ b/INITIAL-COMMANDS.md @@ -22,8 +22,11 @@ Run the complete base installation: :local CertFileName "ISRG-Root-X2.pem"; :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470"; - :if (!(([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ - [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ + :local CertSettings [ /certificate/settings/get ]; + :if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ "fetch" || \ + ($CertSettings->"builtin-trust-store") = "all") && \ + [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ :put "Importing certificate..."; /tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value; :delay 1s; From 42ad0d310f857ad7b20d791e08c297a3afe86032 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 06/34] contrib/notification: format the values italic --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index c86450c..a4d0486 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,8 +16,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

-

✂️ The message was too long and has been truncated, cut off 13%!

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

+

✂️ The message was too long and has been truncated, cut off 13%!

From daf1cfb3810a8ec96e7271d23b14d3f545500105 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:47:55 +0100 Subject: [PATCH 07/34] global-functions: $CertificateAvailable: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- global-functions.rsc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index eb837aa..9f92b07 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -106,11 +106,15 @@ # check and download required certificate :set CertificateAvailable do={ :local CommonName [ :tostr $1 ]; + :local UseFor [ :tostr $2 ]; :global CertificateDownload; + :global EitherOr; :global LogPrint; :global ParseKeyValueStore; + :set UseFor [ $EitherOr $UseFor "undefined" ]; + :if ([ /system/resource/get free-hdd-space ] < 8388608 && \ [ /certificate/settings/get crl-download ] = true && \ [ /certificate/settings/get crl-store ] = "system") do={ @@ -123,7 +127,10 @@ :return false; } - :if (([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ + :local CertSettings [ /certificate/settings/get ]; + :if ((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ $UseFor || \ + ($CertSettings->"builtin-trust-store") = "all") && \ [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CommonName . "\" ] ]") ]] > 0) do={ :return true; } From 5c9825760fb09b9b22dd4c25d7b4b5c785e2e037 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:25:01 +0100 Subject: [PATCH 08/34] doc/mod/notification-telegram: use relative reference in link This may break, depending on site. --- doc/mod/notification-telegram.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 804104f..05180b2 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -107,7 +107,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) Have a look at my -[RouterOS-Scripts Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +[RouterOS-Scripts Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. See also From 0f1f9a467f3f978a2837b556bd94ee56e1b2361d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:59:28 +0100 Subject: [PATCH 09/34] global-functions: $DownloadPackage: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 9f92b07..412777c 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -404,7 +404,7 @@ :return true; } - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint error $0 ("Downloading required certificate failed."); :return false; } From b20f025fc5ed7681252e770c2effed85d2a237a5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:27:59 +0100 Subject: [PATCH 10/34] contrib/logo-color: use relative reference in link ... without extra path elements. This may break, depending on site. --- contrib/logo-color.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 8ee1ba9..9962e99 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -33,7 +33,7 @@ logo and download it.

for other browsers may differ.)

See how to -Set +Set a profile photo for your Telegram bot.


From cf375cbdd1f2ad8b4adb0c411d5bd9a2f3ce84ae Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:11 +0100 Subject: [PATCH 11/34] global-functions: $GetMacVendor: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 412777c..d4c37a2 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -640,7 +640,7 @@ } :do { - :if ([ $CertificateAvailable "GTS Root R4" ] = false) do={ + :if ([ $CertificateAvailable "GTS Root R4" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 4de0b2e7be8c831fe4adfb7eca6af2fbf1de5ceb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 17:07:01 +0100 Subject: [PATCH 12/34] contrib/logo-color: place screenshots below each other... ... not side by side. --- contrib/logo-color.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 9962e99..f824e2d 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -24,9 +24,9 @@ something that differentiates? Color it!

Then right-click, click "Take Screenshot" and finally select the logo and download it.

-

Screenshot Browser 01 -Screenshot Browser 02 -Screenshot Browser 03

+

Screenshot Browser 01

+

Screenshot Browser 02

+

Screenshot Browser 03

(This example is with Firefox. The workflow From 87f28c234fad2d67adf05f5ae1ba15740ec498e7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:57 +0100 Subject: [PATCH 13/34] global-functions: $ScriptInstallUpdate: define certificate use --- global-functions.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index d4c37a2..48aaf7f 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1248,7 +1248,7 @@ :global SymbolForNotification; :global ValidateSyntax; - :if ([ $CertificateAvailable "ISRG Root X2" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } @@ -1299,7 +1299,7 @@ } :if ([ :len ($ScriptInfo->"certificate") ] > 0) do={ - :if ([ $CertificateAvailable ($ScriptInfo->"certificate") ] = false) do={ + :if ([ $CertificateAvailable ($ScriptInfo->"certificate") "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } } From a0b4d422b5f9e2723d320c22a7f623b38ffd20d8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:26:05 +0100 Subject: [PATCH 14/34] contrib: introduce Makefile... ... and update references in links. --- contrib/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/Makefile diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..aae3178 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,10 @@ +# Makefile + +HTML := $(wildcard *.html) + +.PHONY: all docs + +all: docs + +docs: $(HTML) + sed -i '/href=/s|\.md|\.html|' $(HTML) From b6be7ded9ad82c8269ee110ab8d459360bb60979 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:05:10 +0100 Subject: [PATCH 15/34] check-certificates: define certificate use --- check-certificates.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-certificates.rsc b/check-certificates.rsc index f2d5c1f..3300bee 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -189,7 +189,7 @@ fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ]; :local CertNewVal [ /certificate/get $CertNew ]; - :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={ + :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("The certificate chain is not available!"); } From e62a19257a04f5dc81b4c75f5e33f1fb4b623c63 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:06:03 +0100 Subject: [PATCH 16/34] fw-addr-lists: define certificate use --- fw-addr-lists.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index c85cc8b..e5a71aa 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -74,7 +74,7 @@ :if ([ :len ($List->"cert") ] > 0) do={ :set CheckCertificate true; - :if ([ $CertificateAvailable ($List->"cert") ] = false) do={ + :if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \ " / " . $List->"url" . ") failed, trying anyway."); } From 8a908be4e0d200eecc3ecca09d0e176e310bfdb3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 11:07:38 +0100 Subject: [PATCH 17/34] contrib/checksums.sh: output to stdout... ... and let the Makefile redirect. --- Makefile | 2 +- contrib/checksums.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 680d768..b799535 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json < $< > $@ checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh + contrib/checksums.sh > $@ clean: rm -f $(HTML) checksums.json diff --git a/contrib/checksums.sh b/contrib/checksums.sh index b472b49..ab4e973 100755 --- a/contrib/checksums.sh +++ b/contrib/checksums.sh @@ -6,4 +6,4 @@ set -e md5sum $(find -name '*.rsc' | sort) | \ sed -e "s| \./||" -e 's|.rsc$||' | \ - jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' > 'checksums.json' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' From 76f9d34a70ca6b8491183a5c7430c6d420066564 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:22 +0100 Subject: [PATCH 18/34] mod/notification-ntfy: define certificate use --- mod/notification-ntfy.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc index 7114020..dd10812 100644 --- a/mod/notification-ntfy.rsc +++ b/mod/notification-ntfy.rsc @@ -109,7 +109,7 @@ :onerror Err { :if ($Server = "ntfy.sh") do={ - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 74f343f6d5cce80234cafb6e69364364dff29507 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 2 Nov 2025 09:19:16 +0100 Subject: [PATCH 19/34] global-functions: $ScriptInstallUpdate: give hint on ignore Fixes: https://github.com/eworm-de/routeros-scripts/issues/112 --- global-functions.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 3089d2e..b5fc0eb 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1313,6 +1313,11 @@ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; } + :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ + [ :len $CheckSum ] = 0) do={ + $LogPrintOnce warning $0 \ + ("Added the script manually? Skip updates with 'ignore=true' in comment."); + } :error false; } From 066ef8cc4aff896c1ee1da757f6cde944a0d37e2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:09:43 +0100 Subject: [PATCH 20/34] mod/notification-telegram: define certificate use --- mod/notification-telegram.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index ff9b4da..b1996a3 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -30,7 +30,7 @@ :return false; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -72,7 +72,7 @@ :global CertificateAvailable; :global LogPrint; - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -197,7 +197,7 @@ "&reply_to_message_id=" . ($Notification->"replyto") . "&message_thread_id=" . $ThreadId . \ "&disable_web_page_preview=true&parse_mode=MarkdownV2"); :onerror Err { - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From a31f5559aa9a96cb39c348025f2dd631aa7b4736 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 00:00:03 +0100 Subject: [PATCH 21/34] global-functions: $ScriptInstallUpdate: either or... ... but not both. --- global-functions.rsc | 1 + 1 file changed, 1 insertion(+) diff --git a/global-functions.rsc b/global-functions.rsc index b5fc0eb..2379f9b 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1312,6 +1312,7 @@ :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; + :error false; } :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ [ :len $CheckSum ] = 0) do={ From ac9dfe491397259da61a5303f60a8fc389f75f44 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:07:22 +0100 Subject: [PATCH 22/34] netwatch-dns: define certificate use --- netwatch-dns.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 9e2f9bc..eee5f85 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -112,7 +112,7 @@ :foreach DohServer in=$DohServers do={ :if ([ :len ($DohServer->"doh-cert") ] > 0) do={ - :if ([ $CertificateAvailable ($DohServer->"doh-cert") ] = false) do={ + :if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={ $LogPrint warning $ScriptName ("Downloading certificate failed, trying without."); } } From 204977c68519f5615188d62e0816a83c3b01b941 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 3 Nov 2025 09:17:25 +0100 Subject: [PATCH 23/34] global-functions: $ScriptInstallUpdate: extra actions on 'not found' only --- global-functions.rsc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 2379f9b..eb837aa 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1309,6 +1309,10 @@ } } do={ $LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err); + :if ($Err != "Fetch failed with status 404") do={ + :error false; + } + :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; From c50844d46fd6003909d6872d846ec6fd560dda04 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:58 +0100 Subject: [PATCH 24/34] telegram-chat: define certificate use --- telegram-chat.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 7f7b7a7..54872fb 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -61,7 +61,7 @@ :set TelegramRandomDelay 0; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From c25d276d0e62550493ccfc0c2967640d61e30ab0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 6 Nov 2025 17:32:37 +0100 Subject: [PATCH 25/34] Makefile: clean up and add phony targets --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b799535..f841ca2 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,28 @@ # template scripts -> final scripts # markdown files -> html files -CAPSMAN = $(wildcard *.capsman.rsc) -LOCAL = $(wildcard *.local.rsc) -WIFI = $(wildcard *.wifi.rsc) +ALL_RSC := $(wildcard *.rsc */*.rsc) +GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc) -MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) +HTML := $(MARKDOWN:.md=.html) -all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json +.PHONY: all checksums docs rsc clean + +all: checksums docs rsc + +checksums: checksums.json + +checksums.json: contrib/checksums.sh $(ALL_RSC) + contrib/checksums.sh > $@ + +docs: $(HTML) %.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ +rsc: $(GEN_RSC) + %.capsman.rsc: %.template.rsc Makefile sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \ -e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \ @@ -32,8 +42,5 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ < $< > $@ -checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh > $@ - clean: rm -f $(HTML) checksums.json From 2b4ccfe7aa52514e7dc0232f8764f371b4691238 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:03:33 +0100 Subject: [PATCH 26/34] update-tunnelbroker: define certificate use --- update-tunnelbroker.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc index 9057e1e..5372f4c 100644 --- a/update-tunnelbroker.rsc +++ b/update-tunnelbroker.rsc @@ -28,7 +28,7 @@ :error false; } - :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint error $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From 7a8eecf55552a1588478a9161e4c2450fc1629ad Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:03:58 +0100 Subject: [PATCH 27/34] fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de --- fw-addr-lists.d/allow | 2 +- fw-addr-lists.d/block | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index 8b59ed7..f0239cd 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md git.eworm.de diff --git a/fw-addr-lists.d/block b/fw-addr-lists.d/block index 5e9fef2..86a6c62 100644 --- a/fw-addr-lists.d/block +++ b/fw-addr-lists.d/block @@ -1,5 +1,5 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md # example.net 93.184.216.34 From ca7c72338da9b7175a4590ef4172dcef48092752 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:11:38 +0100 Subject: [PATCH 28/34] CERTIFICATES: define certificate use --- CERTIFICATES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CERTIFICATES.md b/CERTIFICATES.md index 69d6c18..0e0a867 100644 --- a/CERTIFICATES.md +++ b/CERTIFICATES.md @@ -61,7 +61,7 @@ Import a certificate by CommonName Running the function `$CertificateAvailable` with that name as parameter makes sure the certificate is available in the device's store: - $CertificateAvailable "ISRG Root X2"; + $CertificateAvailable "ISRG Root X2" "fetch"; If the certificate is actually available already nothing happens, and there is no output. Otherwise the certificate is downloaded and imported. From ba89aa229cf8fba5b9003a7f57f5600a536a51b2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:05:56 +0100 Subject: [PATCH 29/34] fw-addr-lists.d/allow: use rsc.eworm.de in the list --- fw-addr-lists.d/allow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index f0239cd..8c4ca3c 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script # https://rsc.eworm.de/doc/fw-addr-lists.md -git.eworm.de +rsc.eworm.de From c9cf6b7023b6a7f4701b0ad0ae97d03f015fc272 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:08:49 +0100 Subject: [PATCH 30/34] doc/mod/notification-matrix: define certificate use --- doc/mod/notification-matrix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md index da6d6de..ad4cf4f 100644 --- a/doc/mod/notification-matrix.md +++ b/doc/mod/notification-matrix.md @@ -49,7 +49,7 @@ your server in device's certificate store. The example below is for `matrix.org`, which uses a trust chain from *Google Trust Services*. Run this to import the required certificate: - $CertificateAvailable "GTS Root R4"; + $CertificateAvailable "GTS Root R4" "fetch"; Replace the CA certificate name with what ever is needed for your server. You may want to find the From b5f6881f3d1ea642e914e8be8a82d0687c75d909 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:29 +0100 Subject: [PATCH 31/34] README: add a line break before command --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0d26bd..529bb4c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ download the certificates. > 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the -> trust for these builtin trust anchors: +> trust for these builtin trust anchors: > `/certificate/settings/set builtin-trust-anchors=trusted;` If you intend to download the scripts from a @@ -173,7 +173,7 @@ This last step is required when ever you make changes to your configuration. > ℹ️ **Info**: It is recommended to edit the configuration using the command > line interface. If using Winbox on Windows OS, the line endings may be -> missing. To fix this run: +> missing. To fix this run: > `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;` Updating scripts From 6fb70fe2a14e4723ce84e03c3be9006f0c856557 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:19:44 +0100 Subject: [PATCH 32/34] README: move the QR code --- README.md | 2 +- README.d/upstream.png => general/qr-code.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename README.d/upstream.png => general/qr-code.png (100%) diff --git a/README.md b/README.md index b77538d..36408ec 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ immediately remove the link in question. Upstream -------- -[![upstream](README.d/upstream.png)](https://rsc.eworm.de/) +[![upstream](general/qr-code.png)](https://rsc.eworm.de/) URL: [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts) diff --git a/README.d/upstream.png b/general/qr-code.png similarity index 100% rename from README.d/upstream.png rename to general/qr-code.png From 736c0ac08cd74aca32f9e4d0bbcf0ff0cb9fdf6e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:08:11 +0100 Subject: [PATCH 33/34] contrib/html: add a head with eworm, QR code and caption --- contrib/html.sh | 2 ++ contrib/html.sh.d/head.html | 11 +++++++++++ general/eworm-meadow.avif | Bin 0 -> 3922 bytes general/style.css | 12 ++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 general/eworm-meadow.avif diff --git a/contrib/html.sh b/contrib/html.sh index 5b0b978..6276df1 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -7,6 +7,8 @@ sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ + -e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \ + -e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 0ce3ff7..1d4f93a 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -4,3 +4,14 @@ + + + + + + + + + +
eworm on meadowQR code: rsc.eworm.deRouterOS Scripts
a collection of scripts for MikroTik RouterOS
+


diff --git a/general/eworm-meadow.avif b/general/eworm-meadow.avif new file mode 100644 index 0000000000000000000000000000000000000000..f592d59b86c9d178954a09bfb30dd7b6268a3a0b GIT binary patch literal 3922 zcmYLF1y~c@_ufWLN>a*6w}Nyy=?*0&MaGyg*kHhzgtWvEBqfy;KR`x_bSW(iK?wnNzN)@xT|uyz9`?n1N@Jn&}WP`3gZbo zQ}QDH5&ymb05HP>gHV5ao^|a(V*D`_e2T=teJRL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 pre code { span.link { color: #863600; } +td.head-top { + height: 48px; + vertical-align: bottom; + font-size: 250%; + font-weight: bold; +} +td.head-bottom { + height: 48px; + vertical-align: top; + font-size: 125%; + color: #555; +} @media only screen and (orientation: landscape) { body { margin-left: 10vw; From b751a6d5b63390d1dd8c40ad732e61ff9c1b80ab Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:53:31 +0100 Subject: [PATCH 34/34] general/style: make the blockquote darker --- general/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/style.css b/general/style.css index d35e6c4..016ca63 100644 --- a/general/style.css +++ b/general/style.css @@ -18,7 +18,7 @@ a:hover { blockquote { border-left: 4px solid #ccc; padding: 0 10px; - color: #777; + color: #555; } code { margin: 0 2px;