Compare commits

..

69 commits

Author SHA1 Message Date
Christian Hesse
bdec679fc4 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-04-23 09:17:42 +02:00
Christian Hesse
567bfc432d bump required RouterOS version for all scripts 2026-04-23 09:17:42 +02:00
Christian Hesse
be56db9d9e global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-04-23 09:17:42 +02:00
Christian Hesse
8c3bc3c9f3 Merge branch 'break-in-loop' into next 2026-04-23 09:17:42 +02:00
Christian Hesse
65fcca87a5 Merge branch 'continue-in-loop' into next 2026-04-23 09:17:42 +02:00
Christian Hesse
9c1eb0a9af telegram-chat: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
fc59baf93d Merge branch 'early-exit-with-exit' into next 2026-04-23 09:17:42 +02:00
Christian Hesse
f63e74f3d5 dhcp-to-dns: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
083ad9d7e8 telegram-chat: use :break in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
82541dd140 Merge branch 'compare-ids' into next 2026-04-23 09:17:42 +02:00
Christian Hesse
75aa7d1d7b global-functions: deprecate $ExitError 2026-04-23 09:17:42 +02:00
Christian Hesse
79e90f47c8 dhcp-to-dns: use another :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
e02808913e check-certificates: use :break in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
ae1002c05c Merge branch 'drop-builtin-trust-anchors' into next 2026-04-23 09:17:42 +02:00
Christian Hesse
0db1f7abf5 global-functions: deprecate $HexToNum 2026-04-23 09:17:42 +02:00
Christian Hesse
3ab478c2bc update-tunnelbroker: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
ffdbe788e0 dhcp-to-dns: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
ed292faee2 mod/notification-email: get property by name
This works now that we require RouterOS 7.21 anyway.
2026-04-23 09:17:42 +02:00
Christian Hesse
283404e543 INITIAL-COMMANDS: drop the old builtin-trust-anchors 2026-04-23 09:17:42 +02:00
Christian Hesse
096508dafb log-forward: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
cf5273e29b update-gre-address: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
8e985fb74e telegram-chat: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
7970638076 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-23 09:17:42 +02:00
Christian Hesse
666be371bc global-functions: $CertificateDownload: drop the old builtin-trust-anchors 2026-04-23 09:17:42 +02:00
Christian Hesse
bc71d155a6 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-23 09:17:42 +02:00
Christian Hesse
1e205f73e2 telegram-chat: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
7d9c8aee9d netwatch-dns: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
ef3f1258aa global-functions: $CertificateAvailable: drop the old builtin-trust-anchors 2026-04-23 09:17:42 +02:00
Christian Hesse
cd1db0d16a sms-forward: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
686a2c991a netwatch-dns: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
9612140f1e README: drop the old builtin-trust-anchors 2026-04-23 09:17:42 +02:00
Christian Hesse
6ea84268c8 sms-action: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
856a35ff9b netwatch-dns: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
9c9e189330 ppp-on-up: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
e278f596b4 netwatch-dns: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
925dd7c9a9 packages-update: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
6824a68b3e global-functions: $ScriptInstallUpdate: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
b894c179a2 ospf-to-leds: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
2c9c961d8a global-functions: $ScriptInstallUpdate: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
4123b4259a netwatch-notify: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
1bb343dbcd fw-addr-lists: fix indention 2026-04-23 09:17:42 +02:00
Christian Hesse
24f4e10b10 netwatch-dns: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
94d300daee fw-addr-lists: use :continue in loop 2026-04-23 09:17:42 +02:00
Christian Hesse
a85d886d54 log-forward: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
74d6d57ae0 ipv6-update: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
88c399f737 ipsec-to-dns: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
0638764dff hotspot-to-wpa-cleanup: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
a4d89a863b hotspot-to-wpa: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
aa7c6cfd66 gps-track: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
5a57ff0da6 fw-addr-lists: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
cb6a6b1442 firmware-upgrade-reboot: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
33fa9a0148 dhcpv6-client-lease: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
d3a27452ce dhcpv4-server-lease: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
6a9876ee16 dhcp-to-dns: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
3044ca8752 dhcp-lease-comment: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
dc221012b5 daily-psk: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
651407c942 collect-wireless-mac: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
9c64bab5e9 check-routeros-update: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
0178809a4b check-perpetual-license: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
2538407e52 check-lte-firmware-upgrade: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
0b64489d77 check-health: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
2c4b323143 check-certificates: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
463bbfdddb certificate-renew-issued: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
1e7c0f9f1d capsman-rolling-upgrade: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
777fa721fc capsman-download-packages: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
b49e540178 backup-upload: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
b8343e5213 backup-partition: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
ad2b5a8560 backup-email: early exit with :exit 2026-04-23 09:17:42 +02:00
Christian Hesse
f852c7ec46 backup-cloud: early exit with :exit 2026-04-23 09:17:42 +02:00
8 changed files with 5 additions and 16 deletions

View file

@ -15,7 +15,6 @@
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global BackupFileNameDate;
:global BackupPassword;
:global BackupRandomDelay;
:global BackupSendBinary;
@ -69,9 +68,7 @@
# filename based on identity
:local DirName ("tmpfs/" . $ScriptName);
:local Clock [ /system/clock/get ];
:local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse ($BackupFileNameDate = true) \
("-" . $Clock->"date" . "-" . $Clock->"time" . "-" . $Clock->"gmt-offset") "" ] ) ];
:local FileName [ $CleanName ($Identity . "." . $Domain) ];
:local FilePath ($DirName . "/" . $FileName);
:local BackupFile "none";
:local ExportFile "none";

View file

@ -16,7 +16,6 @@
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global BackupFileNameDate;
:global BackupPassword;
:global BackupRandomDelay;
:global BackupSendBinary;
@ -69,9 +68,7 @@
# filename based on identity
:local DirName ("tmpfs/" . $ScriptName);
:local Clock [ /system/clock/get ];
:local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse ($BackupFileNameDate = true) \
("-" . $Clock->"date" . "-" . $Clock->"time" . "-" . $Clock->"gmt-offset") "" ] ) ];
:local FileName [ $CleanName ($Identity . "." . $Domain) ];
:local FilePath ($DirName . "/" . $FileName);
:local BackupFile "none";
:local ExportFile "none";

View file

@ -34,7 +34,6 @@ Configuration
The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupFileNameDate`: whether to add date & time in filenames
* `BackupSendBinary`: whether to send binary backup
* `BackupSendExport`: whether to send configuration export
* `BackupSendGlobalConfig`: whether to send `global-config-overlay`

View file

@ -40,7 +40,6 @@ Configuration
The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupFileNameDate`: whether to add date & time in filenames
* `BackupSendBinary`: whether to send binary backup
* `BackupSendExport`: whether to send configuration export
* `BackupSendGlobalConfig`: whether to send `global-config-overlay`

View file

@ -90,9 +90,7 @@
# Toggle this to disable color output in terminal/cli.
:global TerminalColorOutput true;
# This defines whether to add date & time in filenames, what backups to generate,
# the password to use, and what random delay (between 0 and given seconds) to apply.
:global BackupFileNameDate false;
# This defines what backups to generate and what password to use.
:global BackupSendBinary false;
:global BackupSendExport true;
:global BackupSendGlobalConfig true;

View file

@ -15,7 +15,7 @@
# Git commit id & info, expected configuration version
:global CommitId "unknown";
:global CommitInfo "unknown";
:global ExpectedConfigVersion 143;
:global ExpectedConfigVersion 142;
# global variables not to be changed by user
:global GlobalFunctionsReady false;

View file

@ -49,7 +49,7 @@
:local Pool [ /ipv6/pool/get [ find where prefix=$PdPrefix ] name ];
:if ([ :len [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ] ] = 0) do={
/ipv6/firewall/address-list/add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool) dynamic=yes;
$LogPrint info $ScriptName ("Added dynamic ipv6 address list entry for ipv6-pool-" . $Pool);
$LogPrint warning $ScriptName ("Added dynamic ipv6 address list entry for ipv6-pool-" . $Pool);
}
:local AddrList [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ];
:local OldPrefix [ /ipv6/firewall/address-list/get ($AddrList->0) address ];

View file

@ -67,7 +67,6 @@
140="The scripts 'lease-script' was renamed to 'dhcpv4-server-lease', configuration was updated automatically.";
141="Introduced script 'dhcpv6-client-lease' to run several scripts on IPv6 DHCP client lease.";
142="Added a setting for 'mod/notification-email' to check availability of certificate chain.";
143="Made backup scripts 'backup-email' and 'backup-upload' support date & time in filenames.";
};
# Migration steps to be applied on script updates