mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-04 21:19:36 +00:00
Compare commits
2 commits
2b8dfec2f7
...
cc56680206
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc56680206 | ||
|
|
6fd28bf8f7 |
2 changed files with 9 additions and 4 deletions
|
|
@ -62,7 +62,11 @@
|
|||
:set LogForwardInclude [ $EitherOr $LogForwardInclude [] ];
|
||||
:set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ];
|
||||
|
||||
:local LogAll [ /log/find ];
|
||||
:local MaxId ($LogAll->([ :len $LogAll ] - 1));
|
||||
:local MaxNum [ $HexToNum $MaxId ];
|
||||
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
||||
|
||||
:foreach Message in=[ /log/find where (!(message="") and \
|
||||
!(message~$LogForwardFilterLogForwardingCached) and \
|
||||
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
|
||||
|
|
@ -70,7 +74,8 @@
|
|||
:set MessageVal [ /log/get $Message ];
|
||||
:local Bullet "information";
|
||||
|
||||
:if ($Last < [ $HexToNum ($MessageVal->".id") ]) do={
|
||||
:local Current [ $HexToNum ($MessageVal->".id") ];
|
||||
:if ($Last < $Current && $Current <= $MaxNum) do={
|
||||
:local DupCount ($MessageDups->($MessageVal->"message"));
|
||||
:if ($MessageVal->"topics" ~ "(warning)") do={
|
||||
:set Warning true;
|
||||
|
|
@ -106,8 +111,7 @@
|
|||
:set LogForwardRateLimit [ $MAX 0 ($LogForwardRateLimit - 1) ];
|
||||
}
|
||||
|
||||
:local LogAll [ /log/find ];
|
||||
:set LogForwardLast ($LogAll->([ :len $LogAll ] - 1) );
|
||||
:set LogForwardLast $MaxId;
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@
|
|||
|
||||
:foreach DohServer in=$DohServers do={
|
||||
:if ([ :len ($DohServer->"doh-cert") ] > 0) do={
|
||||
:if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={
|
||||
:if ([ $CertificateAvailable ($DohServer->"doh-cert") "fetch" ] = false || \
|
||||
[ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={
|
||||
$LogPrint warning $ScriptName ("Downloading certificate failed, trying without.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue