Compare commits

..

76 commits

Author SHA1 Message Date
Christian Hesse
7df24bf12a netwatch-dns: check with a HTTP/2 request
We need RouterOS 7.24 for this to catch runtime errors for bad
command parameters.

Actually this would work with RouterOS 7.23 on architectures that
support http-version=http2 ...
2026-07-23 10:02:56 +02:00
Christian Hesse
d32a7e25cb Merge branch 'dhcp-to-dns' into next 2026-07-23 10:02:56 +02:00
Christian Hesse
ec4d54f33e bump required RouterOS version for all scripts 2026-07-23 10:02:56 +02:00
Christian Hesse
c70f96514a dhcp-to-dns: allow to ignore for specific lease 2026-07-23 10:02:56 +02:00
Christian Hesse
0d9af98c81 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-07-23 10:02:56 +02:00
Christian Hesse
b9950f8819 update list of contributors 2026-07-23 10:02:56 +02:00
Christian Hesse
15bf3b7f33 Merge branch 'break-in-loop' into next 2026-07-23 10:02:56 +02:00
Łukasz Witkowski
16c9567916 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.

Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-23 10:02:56 +02:00
Christian Hesse
b6164546f5 Merge branch 'continue-in-loop' into next 2026-07-23 10:02:56 +02:00
Christian Hesse
01c4193bd3 telegram-chat: fix indention 2026-07-23 10:02:56 +02:00
Łukasz Witkowski
496bd8ba5d dhcp-to-dns: set $LeaseInfo
Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-23 10:02:56 +02:00
Christian Hesse
b4a72baf6b dhcp-to-dns: fix indention 2026-07-23 10:02:56 +02:00
Christian Hesse
0792f6a130 telegram-chat: use :break in loop 2026-07-23 10:02:56 +02:00
Łukasz Witkowski
d65e494ecc dhcp-to-dns: convert DNS names to lower case
Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-23 10:02:56 +02:00
Christian Hesse
8e6aee8e11 dhcp-to-dns: use another :continue in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
d835928352 check-certificates: use :break in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
930b89a356 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-07-23 10:02:56 +02:00
Christian Hesse
2f2d53031f dhcp-to-dns: use :continue in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
78a2403966 telegram-chat: use :continue in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
6096d60407 netwatch-dns: fix indention 2026-07-23 10:02:56 +02:00
Christian Hesse
98ca9e921e netwatch-dns: use :continue in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
d08b3878d8 netwatch-dns: fix indention 2026-07-23 10:02:56 +02:00
Christian Hesse
1beff88406 netwatch-dns: use :continue in loop 2026-07-23 10:02:56 +02:00
Christian Hesse
4b40f54f70 global-functions: $ScriptInstallUpdate: fix indention 2026-07-23 10:02:54 +02:00
Christian Hesse
f7676cc54e Merge branch 'early-exit-with-exit' into next 2026-07-23 09:59:10 +02:00
Christian Hesse
5f44f78a2e global-functions: $ScriptInstallUpdate: use :continue in loop 2026-07-23 09:59:10 +02:00
Christian Hesse
3f54d7d298 Merge branch 'compare-ids' into next 2026-07-23 09:59:10 +02:00
Christian Hesse
bfc5f2aa70 global-functions: deprecate $ExitError 2026-07-23 09:59:10 +02:00
Christian Hesse
2419f9b70f global-functions: $CleanName: use :continue in loop 2026-07-23 09:59:10 +02:00
Christian Hesse
03eef94c06 mode-button: set dont-require-permissions 2026-07-23 09:59:10 +02:00
Christian Hesse
e7a29b6a1e global-functions: deprecate $HexToNum 2026-07-23 09:59:10 +02:00
Christian Hesse
1873827e45 update-tunnelbroker: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
c5a471f573 fw-addr-lists: fix indention 2026-07-23 09:59:10 +02:00
Christian Hesse
6ec01a8695 global-functions: $ScriptInstallUpdate: match in one regular expression 2026-07-23 09:59:10 +02:00
Christian Hesse
f1a628e40b log-forward: fix indention 2026-07-23 09:59:10 +02:00
Christian Hesse
d2c8d7eade update-gre-address: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
f29ccec812 fw-addr-lists: use :continue in loop 2026-07-23 09:59:10 +02:00
Christian Hesse
469ec93dd1 log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.

Initializing $LogForwardLast with boolean value looks odd, but this is
required to match the very first message.
2026-07-23 09:59:10 +02:00
Christian Hesse
41aafbe0b8 telegram-chat: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
8e1822daa1 sms-forward: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
5146de7381 sms-action: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
2d1741a233 ppp-on-up: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
0138ae4d88 packages-update: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
232d13ec27 ospf-to-leds: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
f2f02d25a7 netwatch-notify: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
124607a654 netwatch-dns: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
08a9336040 mode-button-scheduler: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
667f158631 log-forward: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
6b013096e1 ipv6-update: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
086cc3b54c ipsec-to-dns: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
62c4e1d9bc hotspot-to-wpa-cleanup: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
12e8d1d751 hotspot-to-wpa: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
baa4744c58 gps-track: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
5239330a88 fw-addr-lists: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
a4ec798295 firmware-upgrade-reboot: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
7ab26ca3ed dhcpv6-client-lease: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
f6cc023b7e dhcpv4-server-lease: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
90e0db55c5 dhcp-to-dns: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
36875a450d dhcp-lease-comment: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
8982d393c4 daily-psk: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
d60fc7002f collect-wireless-mac: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
ab22e7d645 check-routeros-update: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
e1e64c30e9 check-perpetual-license: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
00faed3102 check-lte-firmware-upgrade: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
5a5b62b868 check-health: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
b87c6db415 check-certificates: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
413a9871a5 certificate-renew-issued: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
59eca4ddab capsman-rolling-upgrade: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
dda458a857 capsman-download-packages: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
d3a5bc33ac backup-upload: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
d4def7d0a0 backup-partition: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
24bff08900 backup-email: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
f91be89ec5 backup-cloud: early exit with :exit 2026-07-23 09:59:10 +02:00
Christian Hesse
162dfbd8b6 global-functions: $ScriptInstallUpdate: support setting dont-require-permissions 2026-07-23 09:35:00 +02:00
Christian Hesse
1867c110c4 global-functions: $ScriptInstallUpdate: support setting policy 2026-07-23 09:33:57 +02:00
Christian Hesse
608499bc89 README: mention mode-button-scheduler 2026-07-23 07:45:00 +02:00
2 changed files with 10 additions and 13 deletions

View file

@ -294,7 +294,7 @@ Available scripts
* [Manage IP addresses with bridge status](doc/ip-addr-bridge.md) (`ip-addr-bridge`)
* [Manage LEDs dark mode](doc/leds-mode.md) (`leds-day-mode`, `leds-night-mode` & `leds-toggle-mode`)
* [Forward log messages via notification](doc/log-forward.md) (`log-forward`)
* [Mode button with multiple presses](doc/mode-button.md) (`mode-button`)
* [Mode button with multiple presses](doc/mode-button.md) (`mode-button` & `mode-button-scheduler`)
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md) (`netwatch-dns`)
* [Notify on host up and down](doc/netwatch-notify.md) (`netwatch-notify`)
* [Visualize OSPF state via LEDs](doc/ospf-to-leds.md) (`ospf-to-leds`)

View file

@ -1377,25 +1377,22 @@
:continue;
}
:local RequirePolicy [ $ParseKeyValueStore [ $Grep $SourceNew ("\23 requires policy, ") ] ];
:if ([ :len ($RequirePolicy->"policy") ] > 0) do={
:set ($ScriptVal->"policy") [ :toarray delimiter=";" \
($RequirePolicy->"policy") ];
$LogPrintOnce debug $0 ("New policy for script '" . $ScriptVal->"name" . \
"': " . ($RequirePolicy->"policy"));
:local ReqPolicy [ $ParseKeyValueStore [ $Grep $SourceNew ("\23 requires policy, ") ] ];
:if ([ :len ($ReqPolicy->"policy") ] > 0) do={
:set ($ScriptVal->"policy") [ :toarray delimiter=";" ($ReqPolicy->"policy") ];
$LogPrint debug $0 ("New policy for script '" . $ScriptVal->"name" . \
"': " . ($ReqPolicy->"policy"));
}
:if ([ :len ($RequirePolicy->"dont-require-permissions") ] > 0) do={
:set ($ScriptVal->"dont-require-permissions") ($RequirePolicy->"dont-require-permissions");
$LogPrintOnce debug $0 ("Setting dont-require-permissions for script '" . $ScriptVal->"name" . "'.");
:if ([ :len ($ReqPolicy->"dont-require-permissions") ] > 0) do={
:set ($ScriptVal->"dont-require-permissions") ($ReqPolicy->"dont-require-permissions");
$LogPrint debug $0 ("Setting dont-require-permissions for script '" . $ScriptVal->"name" . "'.");
}
$LogPrint info $0 ("Updating script: " . $ScriptVal->"name");
/system/script/set owner=($ScriptVal->"name") policy=($ScriptVal->"policy") \
dont-require-permissions=($ScriptVal->"dont-require-permissions") \
source=[ $IfThenElse ($ScriptUpdatesCRLF = true) $SourceCRLF $SourceNew ] $Script;
:if ($ScriptVal->"name" = "global-config" || \
$ScriptVal->"name" = "global-functions" || \
$ScriptVal->"name" ~ ("^(global-functions\\.d|mod)/.")) do={
:if ($ScriptVal->"name" ~ ("^(global-config|global-functions(\\.d/.+)?|mod/.+)\$")) do={
:set ReloadGlobal true;
}
}