Compare commits

..

8 commits

Author SHA1 Message Date
Christian Hesse
8dcdc4b086 global-functions: drop $HexToNum 2026-01-13 22:56:50 +01:00
Christian Hesse
577c226deb log-forward: try to mitigate a race condition 2026-01-13 22:56:50 +01:00
Christian Hesse
c46e44e8a9 log-forward: fix indention 2026-01-13 21:28:26 +01:00
Christian Hesse
44663f0c38 log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.
2026-01-13 21:28:26 +01:00
Christian Hesse
c9f0c5a9f2 check-certificates: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-12 12:37:36 +01:00
Christian Hesse
91cc0f7c73 global-functions: $CertificateAvailable: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-12 12:37:20 +01:00
Christian Hesse
c3fa6ef8b1 INITIAL-COMMANDS: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-12 12:36:42 +01:00
Christian Hesse
f5720fee36 doc/mod/ssh-keys-import: reverse old and new 2026-01-12 12:35:57 +01:00
3 changed files with 8 additions and 10 deletions

View file

@ -4,7 +4,7 @@ Forward log messages via notification
[![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.22beta1-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-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)

View file

@ -3,7 +3,7 @@
# Copyright (c) 2020-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.22beta1
# requires RouterOS, version=7.17
#
# forward log messages via notification
# https://rsc.eworm.de/doc/log-forward.md
@ -37,9 +37,8 @@
:error false;
}
:if ([ :typeof $LogForwardLast ] = "nothing") do={
:set LogForwardLast false;
}
# LogForwardLast is not initialized, by intention: we want
# to catch *0 on first invocation!
:if ([ :typeof $LogForwardRateLimit ] = "nothing") do={
:set LogForwardRateLimit 0;
@ -65,10 +64,10 @@
:set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ];
:local LogAll [ /log/find ];
:local Max ($LogAll->([ :len $LogAll ] - 1));
:local LogForwardMax ($LogAll->([ :len $LogAll ] - 1) );
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
:foreach Message in=[ /log/find where .id>$LogForwardLast and .id<=$Max and \
:foreach Message in=[ /log/find where .id>$LogForwardLast and .id<=$LogForwardMax and \
((!(message="") and !(message~$LogForwardFilterLogForwardingCached) and \
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
topics~$LogForwardInclude or message~$LogForwardIncludeMessage) ] do={
@ -109,7 +108,7 @@
:set LogForwardRateLimit [ $MAX 0 ($LogForwardRateLimit - 1) ];
}
:set LogForwardLast $Max;
:set LogForwardLast $LogForwardMax;
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}

View file

@ -104,8 +104,7 @@
:foreach DohServer in=$DohServers do={
:if ([ :len ($DohServer->"doh-cert") ] > 0) do={
:if ([ $CertificateAvailable ($DohServer->"doh-cert") "fetch" ] = false || \
[ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={
:if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={
$LogPrint warning $ScriptName ("Downloading certificate failed, trying without.");
}
}