Compare commits

..

67 commits

Author SHA1 Message Date
Christian Hesse
b5e6b9cb55 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-04-16 09:04:54 +02:00
Christian Hesse
3e34f2d88a bump required RouterOS version for all scripts 2026-04-16 09:04:54 +02:00
Christian Hesse
38802c16f2 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-04-16 09:04:54 +02:00
Christian Hesse
a4a5c09e2a Merge branch 'break-in-loop' into next 2026-04-16 09:04:54 +02:00
Christian Hesse
73dccfeb28 Merge branch 'continue-in-loop' into next 2026-04-16 09:04:54 +02:00
Christian Hesse
ef18e98b9b telegram-chat: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
b5444cf2fd Merge branch 'early-exit-with-exit' into next 2026-04-16 09:04:54 +02:00
Christian Hesse
91479a1e4c dhcp-to-dns: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
02d763ca02 telegram-chat: use :break in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
51a228e897 global-functions: deprecate $ExitError 2026-04-16 09:04:54 +02:00
Christian Hesse
b0ad0c3dbd dhcp-to-dns: use another :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
cddf7417f5 check-certificates: use :break in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
0bb63d4465 update-tunnelbroker: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
ed5092b0c7 dhcp-to-dns: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
6ea74adcef update-gre-address: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
7fb5c8936d telegram-chat: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
9848e6a4b2 telegram-chat: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
1ba2dce274 netwatch-dns: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
76f84bd525 sms-forward: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
1a19eefd07 netwatch-dns: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
01467ce142 sms-action: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
9ca4a8ef5d netwatch-dns: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
837a3a22fd ppp-on-up: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
a4d084d0e0 netwatch-dns: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
f31ec1f411 packages-update: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
f49f931b51 global-functions: $ScriptInstallUpdate: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
35e029afca ospf-to-leds: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
76463098b9 global-functions: $ScriptInstallUpdate: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
8213cf54ca netwatch-notify: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
ba4846b912 fw-addr-lists: fix indention 2026-04-16 09:04:54 +02:00
Christian Hesse
f8440e3e77 netwatch-dns: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
a8ef2a967e fw-addr-lists: use :continue in loop 2026-04-16 09:04:54 +02:00
Christian Hesse
f5a88be0dc log-forward: early exit with :exit 2026-04-16 09:04:54 +02:00
Christian Hesse
0a24236008 ipv6-update: early exit with :exit 2026-04-16 09:04:50 +02:00
Christian Hesse
49cd55ed68 Merge branch 'compare-ids' into next 2026-04-16 09:04:20 +02:00
Christian Hesse
31dd558e34 ipsec-to-dns: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
3a0a9f1129 Merge branch 'drop-builtin-trust-anchors' into next 2026-04-16 09:04:20 +02:00
Christian Hesse
f0573ef876 global-functions: deprecate $HexToNum 2026-04-16 09:04:20 +02:00
Christian Hesse
b8c2c29cbb hotspot-to-wpa-cleanup: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
f478123a77 mod/notification-email: use errors from command...
... instead of reading status from properties. This was introduced in
RouterOS 7.21beta2 (and we bump to 7.21 instead).
2026-04-16 09:04:20 +02:00
Christian Hesse
d2607d8fc3 INITIAL-COMMANDS: drop the old builtin-trust-anchors 2026-04-16 09:04:20 +02:00
Christian Hesse
8eb4fa17de log-forward: fix indention 2026-04-16 09:04:20 +02:00
Christian Hesse
19aae0a877 hotspot-to-wpa: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
924c8137a9 global-functions: $CertificateAvailable: drop the old builtin-trust-anchors 2026-04-16 09:04:20 +02:00
Christian Hesse
77e7874ab8 log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.

Initializing $LogForwardLast with boolean value looks odd, but this is
reuqired to match the very first message.
2026-04-16 09:04:20 +02:00
Christian Hesse
b8da69650b gps-track: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
9a5fc63a3a README: drop the old builtin-trust-anchors 2026-04-16 09:04:20 +02:00
Christian Hesse
99f129b631 fw-addr-lists: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
5d62609761 firmware-upgrade-reboot: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
b3f7df8d9c dhcpv6-client-lease: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
4aaae00e53 dhcpv4-server-lease: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
cfcb69d26a dhcp-to-dns: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
a7ad11d4fd dhcp-lease-comment: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
fde9f2db71 daily-psk: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
83a485619a collect-wireless-mac: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
6810a60546 check-routeros-update: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
fa077e96b8 check-perpetual-license: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
2436932dff check-lte-firmware-upgrade: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
41057fb80a check-health: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
7398b34cc7 check-certificates: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
f7b147dc55 certificate-renew-issued: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
244027c90b capsman-rolling-upgrade: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
d52feb86f6 capsman-download-packages: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
65d6044793 backup-upload: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
9056e6d10c backup-partition: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
e3d217732c backup-email: early exit with :exit 2026-04-16 09:04:20 +02:00
Christian Hesse
ca1dc1e23a backup-cloud: early exit with :exit 2026-04-16 09:04:20 +02:00
4 changed files with 4 additions and 22 deletions

View file

@ -37,8 +37,7 @@ Also make sure the device has correct time configured, best is to set up
the ntp client.
Then edit `global-config-overlay`, add `EmailGeneralTo` with a valid
recipient address. Optionally add `EmailServerCertificate` if you have
certificate verification enabled. Finally reload the configuration.
recipient address. Finally reload the configuration.
> **Info**: Copy relevant configuration from
> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to

View file

@ -31,7 +31,6 @@
:global EmailGeneralCc "";
#:global EmailGeneralTo "mail@example.com";
#:global EmailGeneralCc "another@example.com,third@example.com";
:global EmailServerCertificate "";
# You can send Telegram notifications. Register a bot
# and add the token and chat ids here, then install the module:

View file

@ -109,13 +109,11 @@
:local UseFor [ :tostr $2 ];
:global CertificateDownload;
:global EitherOr;
:global LogPrint;
:global ParseKeyValueStore;
:if ([ :len $UseFor ] = 0) do={
$LogPrint warning $0 ("The intended use is undefined!");
:set UseFor "undefined";
}
:set UseFor [ $EitherOr $UseFor "undefined" ];
:if ([ /system/resource/get free-hdd-space ] < 8388608 && \
[ /certificate/settings/get crl-download ] = true && \
@ -188,11 +186,7 @@
$LogPrint warning $0 ("Failed downloading certificate with CommonName '" . $CommonName . \
"' from repository! Trying fallback to mkcert.org...");
:do {
:local CertSettings [ /certificate/settings/get ];
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0 && \
!((($CertSettings->"builtin-trust-store") ~ "fetch" || \
($CertSettings->"builtin-trust-store") = "all") && \
[ :len [ /certificate/builtin/find where common-name="ISRG Root X1" ] ] > 0)) do={
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0) do={
$LogPrint error $0 ("Required certificate is not available.");
:return false;
}

View file

@ -37,9 +37,7 @@
# flush e-mail queue
:set FlushEmailQueue do={ :onerror Err {
:global EmailQueue;
:global EmailServerCertificate;
:global CertificateAvailable;
:global EitherOr;
:global EMailGenerateFrom;
:global FileExists;
@ -92,14 +90,6 @@
:return false;
}
:if ([ /tool/e-mail/get certificate-verification ] ~ "^yes" && \
[ :len $EmailServerCertificate ] > 0) do={
:if ([ $CertificateAvailable $EmailServerCertificate "email" ] = false) do={
$LogPrint warning $0 ("Downloading required certificate failed.");
:return false;
}
}
/system/scheduler/set interval=($QueueLen . "m") comment="Sending..." \
[ find where name="_FlushEmailQueue" ];