mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-06-01 16:22:38 +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>
|
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - state plugin
|
# check for RouterOS health state - state plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - temperature plugin
|
# check for RouterOS health state - temperature plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
@ -30,8 +30,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:local TempToNum do={
|
:local TempToNum do={
|
||||||
:global CharacterReplace;
|
:local T [ :toarray delimiter="." $1 ];
|
||||||
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
|
|
||||||
:return ($T->0 * 10 + $T->1);
|
:return ($T->0 * 10 + $T->1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - voltage plugin
|
# check for RouterOS health state - voltage plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
#
|
#
|
||||||
# check for RouterOS health state
|
# check for RouterOS health state
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
@ -31,8 +31,7 @@
|
||||||
:global ValidateSyntax;
|
:global ValidateSyntax;
|
||||||
|
|
||||||
:local TempToNum do={
|
:local TempToNum do={
|
||||||
:global CharacterReplace;
|
:local T [ :toarray delimiter="." $1 ];
|
||||||
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
|
|
||||||
:return ($T->0 * 10 + $T->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/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](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/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](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/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](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>
|
# Copyright (c) 2023-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
#
|
#
|
||||||
# download, import and update firewall address-lists
|
# download, import and update firewall address-lists
|
||||||
# https://rsc.eworm.de/doc/fw-addr-lists.md
|
# https://rsc.eworm.de/doc/fw-addr-lists.md
|
||||||
|
|
@ -72,11 +72,13 @@
|
||||||
:local Data false;
|
:local Data false;
|
||||||
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
|
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
|
||||||
|
|
||||||
:if ([ :len ($List->"cert") ] > 0) do={
|
:foreach Cert in=[ :toarray delimiter=":" ($List->"cert") ] do={
|
||||||
:set CheckCertificate true;
|
:if ([ :len ($Cert) ] > 0) do={
|
||||||
:if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={
|
:set CheckCertificate true;
|
||||||
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
:if ([ $CertificateAvailable $Cert "fetch" ] = false) do={
|
||||||
" / " . $List->"url" . ") failed, trying anyway.");
|
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
||||||
|
" / " . $List->"url" . ") failed, trying anyway.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,11 +112,11 @@
|
||||||
:global FwAddrLists {
|
:global FwAddrLists {
|
||||||
# "allow"={
|
# "allow"={
|
||||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/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"={
|
"block"={
|
||||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/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";
|
{ 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
|
# # higher level (decrease the numerical value) for more addresses, and vice versa
|
||||||
cert="ISRG Root X1" };
|
cert="ISRG Root X1" };
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
};
|
};
|
||||||
# "mikrotik"={
|
# "mikrotik"={
|
||||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/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;
|
:global FwAddrListTimeOut 1d;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.19
|
# requires RouterOS, version=7.21
|
||||||
# requires device-mode, fetch
|
# requires device-mode, fetch
|
||||||
#
|
#
|
||||||
# monitor and manage dns/doh with netwatch
|
# monitor and manage dns/doh with netwatch
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
:global CharacterReplace;
|
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global IsDNSResolving;
|
:global IsDNSResolving;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -104,7 +103,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach DohServer in=$DohServers do={
|
: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 ([ :len $DohCert ] > 0) do={
|
||||||
:if ([ $CertificateAvailable $DohCert "fetch" ] = false || \
|
:if ([ $CertificateAvailable $DohCert "fetch" ] = false || \
|
||||||
[ $CertificateAvailable $DohCert "dns" ] = false) do={
|
[ $CertificateAvailable $DohCert "dns" ] = false) do={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue