Compare commits

..

69 commits

Author SHA1 Message Date
Christian Hesse
17f6f729b7 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-04-28 16:37:09 +02:00
Christian Hesse
c93fff2ff7 bump required RouterOS version for all scripts 2026-04-28 16:37:09 +02:00
Christian Hesse
6629361df3 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-04-28 16:37:09 +02:00
Christian Hesse
8d6027bc04 Merge branch 'break-in-loop' into next 2026-04-28 16:37:09 +02:00
Christian Hesse
663a7d78d4 Merge branch 'continue-in-loop' into next 2026-04-28 16:37:09 +02:00
Christian Hesse
4ce708b570 telegram-chat: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
438a77eafc Merge branch 'early-exit-with-exit' into next 2026-04-28 16:37:09 +02:00
Christian Hesse
3a718865eb dhcp-to-dns: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
2c231b5096 telegram-chat: use :break in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
5cb42b0fe7 Merge branch 'compare-ids' into next 2026-04-28 16:37:09 +02:00
Christian Hesse
c87c285472 global-functions: deprecate $ExitError 2026-04-28 16:37:09 +02:00
Christian Hesse
30fa2372bb dhcp-to-dns: use another :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
ab37c6acec check-certificates: use :break in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
eedcdf6575 Merge branch 'drop-builtin-trust-anchors' into next 2026-04-28 16:37:09 +02:00
Christian Hesse
929c86ef12 global-functions: deprecate $HexToNum 2026-04-28 16:37:09 +02:00
Christian Hesse
c2621fdfe8 update-tunnelbroker: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
53f604738c dhcp-to-dns: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
4349ea150b mod/notification-email: get property by name
This works now that we require RouterOS 7.21 anyway.
2026-04-28 16:37:09 +02:00
Christian Hesse
504dcdef7b INITIAL-COMMANDS: drop the old builtin-trust-anchors 2026-04-28 16:37:09 +02:00
Christian Hesse
590f7e4689 log-forward: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
b2428b8ffe update-gre-address: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
02dd263666 telegram-chat: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
63a13ec096 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-28 16:37:09 +02:00
Christian Hesse
c151fc9e1d global-functions: $CertificateDownload: drop the old builtin-trust-anchors 2026-04-28 16:37:09 +02:00
Christian Hesse
74422f952c 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-28 16:37:09 +02:00
Christian Hesse
e05e7255ba telegram-chat: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
b0aee3c1d6 netwatch-dns: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
c451f2c191 global-functions: $CertificateAvailable: drop the old builtin-trust-anchors 2026-04-28 16:37:09 +02:00
Christian Hesse
9fe451da1b sms-forward: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
68f59f0f49 netwatch-dns: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
c5da07eec9 README: drop the old builtin-trust-anchors 2026-04-28 16:37:09 +02:00
Christian Hesse
3129b07fe3 sms-action: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
f4b34c6556 netwatch-dns: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
89fe43da8b ppp-on-up: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
303ec5a081 netwatch-dns: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
94f6b2c097 packages-update: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
fbf70d7d84 global-functions: $ScriptInstallUpdate: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
d4766f2fa0 ospf-to-leds: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
cd8088872c global-functions: $ScriptInstallUpdate: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
c641bd1bfb netwatch-notify: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
b88c73e082 fw-addr-lists: fix indention 2026-04-28 16:37:09 +02:00
Christian Hesse
324c312af4 netwatch-dns: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
c364c97969 fw-addr-lists: use :continue in loop 2026-04-28 16:37:09 +02:00
Christian Hesse
7e8bdcb3c3 log-forward: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
6033a24c25 ipv6-update: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
11d816ba9d ipsec-to-dns: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
b2818fad1b hotspot-to-wpa-cleanup: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
9d588f4aec hotspot-to-wpa: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
02a4e5b7f2 gps-track: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
add788aea3 fw-addr-lists: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
df12e8846d firmware-upgrade-reboot: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
fe3f98795c dhcpv6-client-lease: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
80f112d0e8 dhcpv4-server-lease: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
acc508ee7a dhcp-to-dns: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
999dc1798d dhcp-lease-comment: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
b163e28402 daily-psk: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
b2b0aa2bdc collect-wireless-mac: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
deac154e9b check-routeros-update: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
a6b1bb33b2 check-perpetual-license: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
c4a14cafbe check-lte-firmware-upgrade: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
0fca38c912 check-health: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
d402beb799 check-certificates: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
797fa73be7 certificate-renew-issued: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
ab1a9622be capsman-rolling-upgrade: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
953911ca59 capsman-download-packages: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
4dc75f16dd backup-upload: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
44864d0a7d backup-partition: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
ae10251ed2 backup-email: early exit with :exit 2026-04-28 16:37:09 +02:00
Christian Hesse
8b19fb396c backup-cloud: early exit with :exit 2026-04-28 16:37:09 +02:00
2 changed files with 8 additions and 14 deletions

View file

@ -782,15 +782,11 @@
# check if DNS is resolving
:set IsDNSResolving do={
:do {
:local I 1;
:retry {
:set I ($I ^ 1);
:resolve ("low-ttl.eworm." . ({ "de"; "net" }->$I));
:return true;
} delay=50ms max=6;
} on-error={ }
:return false;
:resolve "low-ttl.eworm.de";
} on-error={
:return false;
}
:return true;
}
# check if system is is fully connected (default route reachable, DNS resolving, time sync)

View file

@ -111,15 +111,13 @@
:local Data false;
:onerror Err {
:local I 1;
:retry {
:set I ($I ^ 1);
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
http-header-field=({ "accept: application/dns-message" }) \
url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \
"\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm" . \
({ "\02de"; "\03net" }->$I) . "\00" . "\00\10" . "\00\01") ]) as-value ]->"data");
} delay=500ms max=6;
"\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \
"\00\10" . "\00\01") ]) as-value ]->"data");
} delay=1s max=3;
} do={
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \
" failed: " . $Err);