Compare commits

..

78 commits

Author SHA1 Message Date
Christian Hesse
2e4ab307b6 FIXUP 2026-07-22 22:17:25 +02:00
Christian Hesse
54e45287a0 FIXUP 2026-07-22 22:16:48 +02:00
Christian Hesse
f877830ed3 mode-button: set dont-require-permissions 2026-07-22 22:12:11 +02:00
Christian Hesse
38b357ced8 global-functions: $ScriptInstallUpdate: also support setting dont-require-permissions 2026-07-22 22:06:54 +02:00
Christian Hesse
f653b119ef Revert "mode-button: require and set policy"
This reverts commit f11b1c66da.
2026-07-22 09:22:00 +02:00
Christian Hesse
015f793d9e mode-button: require and set policy 2026-07-22 09:22:00 +02:00
Christian Hesse
d7703ef802 global-functions: $ScriptInstallUpdate: support setting policy 2026-07-22 09:22:00 +02:00
Christian Hesse
3a6f5feb4a 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-17 11:48:22 +02:00
Christian Hesse
cd9e3feb54 Merge branch 'dhcp-to-dns' into next 2026-07-17 11:48:22 +02:00
Christian Hesse
3e903b479f bump required RouterOS version for all scripts 2026-07-17 11:48:22 +02:00
Christian Hesse
7de44c9200 dhcp-to-dns: allow to ignore for specific lease 2026-07-17 11:48:22 +02:00
Christian Hesse
02a87dae3c global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-07-17 11:48:22 +02:00
Christian Hesse
800a82ba05 update list of contributors 2026-07-17 11:48:22 +02:00
Christian Hesse
d54af97513 Merge branch 'break-in-loop' into next 2026-07-17 11:48:22 +02:00
Łukasz Witkowski
7ab66fc7a9 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.

Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-17 11:48:22 +02:00
Christian Hesse
6ffb08066f Merge branch 'continue-in-loop' into next 2026-07-17 11:48:22 +02:00
Christian Hesse
2d04d78b05 telegram-chat: fix indention 2026-07-17 11:48:22 +02:00
Łukasz Witkowski
9b47e6b8a7 dhcp-to-dns: set $LeaseInfo
Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-17 11:48:22 +02:00
Christian Hesse
0a6cad5b2b Merge branch 'early-exit-with-exit' into next 2026-07-17 11:48:22 +02:00
Christian Hesse
3315ca52c6 dhcp-to-dns: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
7eb3c21cfa telegram-chat: use :break in loop 2026-07-17 11:48:22 +02:00
Łukasz Witkowski
ece7e9a5cd dhcp-to-dns: convert DNS names to lower case
Co-authored-by: Christian Hesse <mail@eworm.de>
2026-07-17 11:48:22 +02:00
Christian Hesse
c3fc2bf22c Merge branch 'compare-ids' into next 2026-07-17 11:48:22 +02:00
Christian Hesse
6bc651d51c global-functions: deprecate $ExitError 2026-07-17 11:48:22 +02:00
Christian Hesse
a0d8f280d9 dhcp-to-dns: use another :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
a36a17b444 check-certificates: use :break in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
a5b02f27b0 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-07-17 11:48:22 +02:00
Christian Hesse
539fcc3844 global-functions: deprecate $HexToNum 2026-07-17 11:48:22 +02:00
Christian Hesse
f5a814df60 update-tunnelbroker: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
9559b2e21f dhcp-to-dns: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
6cfde9def4 log-forward: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
db93e792e6 update-gre-address: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
2289d69b01 telegram-chat: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
57c954af1d 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-17 11:48:22 +02:00
Christian Hesse
f0cc45d2ab telegram-chat: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
1be42fc35b netwatch-dns: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
dd51fd33e0 sms-forward: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
f1910d0832 netwatch-dns: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
9d0ad044a3 sms-action: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
4da0a30210 netwatch-dns: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
71a4beabac ppp-on-up: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
83e71ffd5d netwatch-dns: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
57f713477b packages-update: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
e92d79b2b7 global-functions: $ScriptInstallUpdate: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
389009453e ospf-to-leds: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
bcb1c77b2f global-functions: $ScriptInstallUpdate: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
d0b8e8f808 netwatch-notify: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
4c14186e18 global-functions: $CleanName: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
4ba4b6d16f netwatch-dns: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
381bb0038a fw-addr-lists: fix indention 2026-07-17 11:48:22 +02:00
Christian Hesse
363adaaa47 mode-button-scheduler: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
b407b08254 fw-addr-lists: use :continue in loop 2026-07-17 11:48:22 +02:00
Christian Hesse
a88eea6e64 log-forward: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
53d17d2981 ipv6-update: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
d4de082771 ipsec-to-dns: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
1b3ce0f834 hotspot-to-wpa-cleanup: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
ceafb0ed04 hotspot-to-wpa: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
add84f32ff gps-track: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
b065a314af fw-addr-lists: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
942c50aff8 firmware-upgrade-reboot: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
03d506d2bf dhcpv6-client-lease: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
5d912bc548 dhcpv4-server-lease: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
6155b6c2a4 dhcp-to-dns: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
7717b30c23 dhcp-lease-comment: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
21a1b32624 daily-psk: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
be629dbfba collect-wireless-mac: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
dc7d6c5c74 check-routeros-update: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
45721186ac check-perpetual-license: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
b9ae49b1bc check-lte-firmware-upgrade: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
9378d2977a check-health: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
f3df68f97d check-certificates: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
5370bc3d0f certificate-renew-issued: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
c946c9b9bb capsman-rolling-upgrade: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
b6a0293572 capsman-download-packages: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
63d76f031a backup-upload: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
bee12c01ae backup-partition: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
dff5444b1e backup-email: early exit with :exit 2026-07-17 11:48:22 +02:00
Christian Hesse
e0bfaddcff backup-cloud: early exit with :exit 2026-07-17 11:48:22 +02:00
2 changed files with 13 additions and 10 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-scheduler`)
* [Mode button with multiple presses](doc/mode-button.md) (`mode-button`)
* [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,22 +1377,25 @@
:continue;
}
: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"));
: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"));
}
: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" . "'.");
: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" . "'.");
}
$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|global-functions(\\.d/.+)?|mod/.+)\$")) do={
:if ($ScriptVal->"name" = "global-config" || \
$ScriptVal->"name" = "global-functions" || \
$ScriptVal->"name" ~ ("^(global-functions\\.d|mod)/.")) do={
:set ReloadGlobal true;
}
}