mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-31 15:52:37 +00:00
Merge branch 'toarray-delimiter' into next
This commit is contained in:
commit
f0a4a2797d
10 changed files with 22 additions and 23 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# check for RouterOS health state - state plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# check for RouterOS health state - temperature plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
@ -30,8 +30,7 @@
|
|||
}
|
||||
|
||||
:local TempToNum do={
|
||||
:global CharacterReplace;
|
||||
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
|
||||
:local T [ :toarray delimiter="." $1 ];
|
||||
:return ($T->0 * 10 + $T->1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# check for RouterOS health state - voltage plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# check for RouterOS health state
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
@ -31,8 +31,7 @@
|
|||
:global ValidateSyntax;
|
||||
|
||||
:local TempToNum do={
|
||||
:global CharacterReplace;
|
||||
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
|
||||
:local T [ :toarray delimiter="." $1 ];
|
||||
:return ($T->0 * 10 + $T->1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Notify about health state
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Download, import and update firewall address-lists
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -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/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2023-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# download, import and update firewall address-lists
|
||||
# https://rsc.eworm.de/doc/fw-addr-lists.md
|
||||
|
|
@ -72,11 +72,13 @@
|
|||
:local Data false;
|
||||
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
|
||||
|
||||
:if ([ :len ($List->"cert") ] > 0) do={
|
||||
:set CheckCertificate true;
|
||||
:if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={
|
||||
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
||||
" / " . $List->"url" . ") failed, trying anyway.");
|
||||
:foreach Cert in=[ :toarray delimiter=":" ($List->"cert") ] do={
|
||||
:if ([ :len ($Cert) ] > 0) do={
|
||||
:set CheckCertificate true;
|
||||
:if ([ $CertificateAvailable $Cert "fetch" ] = false) do={
|
||||
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
||||
" / " . $List->"url" . ") failed, trying anyway.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,11 +112,11 @@
|
|||
:global FwAddrLists {
|
||||
# "allow"={
|
||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/allow";
|
||||
# cert="Root YE"; timeout=1w };
|
||||
# cert="ISRG Root X2:Root YE"; timeout=1w };
|
||||
# };
|
||||
"block"={
|
||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/block";
|
||||
# cert="Root YE" };
|
||||
# cert="ISRG Root X2:Root YE" };
|
||||
{ url="https://raw.githubusercontent.com/stamparm/ipsum/refs/heads/master/levels/4.txt";
|
||||
# # higher level (decrease the numerical value) for more addresses, and vice versa
|
||||
cert="ISRG Root X1" };
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
};
|
||||
# "mikrotik"={
|
||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/mikrotik";
|
||||
# cert="Root YE"; timeout=1w };
|
||||
# cert="ISRG Root X2:Root YE"; timeout=1w };
|
||||
# };
|
||||
};
|
||||
:global FwAddrListTimeOut 1d;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
||||
# 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={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue