Compare commits

..

91 commits

Author SHA1 Message Date
Christian Hesse
28971c1e88 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-01-21 08:57:18 +01:00
Christian Hesse
04a33f9ca5 INITIAL-COMMANDS: drop the old builtin-trust-anchors 2026-01-21 08:57:18 +01:00
Christian Hesse
ad32e1af94 global-functions: $CertificateAvailable: drop the old builtin-trust-anchors 2026-01-21 08:57:18 +01:00
Christian Hesse
4e38a6651e README: drop the old builtin-trust-anchors 2026-01-21 08:57:18 +01:00
Christian Hesse
b53f223527 Merge branch 'continue-in-loop' into next 2026-01-21 08:57:18 +01:00
Christian Hesse
1d170071a5 Merge branch 'early-exit-with-exit' into next 2026-01-21 08:57:18 +01:00
Christian Hesse
d55e237fa6 check-certificates: use :continue in loop 2026-01-21 08:57:18 +01:00
Christian Hesse
6cb3ef6053 global-functions: deprecate $ExitError 2026-01-21 08:57:18 +01:00
Christian Hesse
6835b6fd3a global-functions: $ScriptInstallUpdate: fix indention 2026-01-21 08:57:18 +01:00
Christian Hesse
57bc2fc989 update-tunnelbroker: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
4abfec4f12 global-functions: $ScriptInstallUpdate: use :continue in loop 2026-01-21 08:57:18 +01:00
Christian Hesse
03946e0d74 update-gre-address: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
a802863f4c fw-addr-lists: fix indention 2026-01-21 08:57:18 +01:00
Christian Hesse
740b40e619 telegram-chat: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
77319492fe fw-addr-lists: use :continue in loop 2026-01-21 08:57:18 +01:00
Christian Hesse
27004f9138 sms-forward: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
56f079b81c telegram-chat: use :continue in loop 2026-01-21 08:57:18 +01:00
Christian Hesse
99a49f3f58 sms-action: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
fcb4bfdb1f ppp-on-up: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
81b432b18e packages-update: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
62200bc753 ospf-to-leds: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
7c0b87eabe netwatch-notify: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
6149833e4b netwatch-dns: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
57bb25828d log-forward: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
8d0722d9e1 lease-script: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
bba6f24081 ipv6-update: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
4b1cc263e4 ipsec-to-dns: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
6e3c21cda9 hotspot-to-wpa-cleanup: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
c9ad1fd387 hotspot-to-wpa: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
89694b937e gps-track: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
a3d63b0546 fw-addr-lists: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
8914e38555 firmware-upgrade-reboot: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
7ce09b1125 dhcp-to-dns: early exit with :exit 2026-01-21 08:57:18 +01:00
Christian Hesse
cabbfbe71e Merge branch 'compare-ids' into next 2026-01-21 08:57:17 +01:00
Christian Hesse
cbbe402a00 dhcp-lease-comment: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
e590977d9a 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-01-21 08:57:17 +01:00
Christian Hesse
c628a6a5d2 global-functions: deprecate $HexToNum 2026-01-21 08:57:17 +01:00
Christian Hesse
5cbf0e9621 daily-psk: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
8b7982d73f mod/ssh-keys-import: drop old property
The property name changed in RouterOS 7.21beta2, so bump required
version to 7.21.
2026-01-21 08:57:17 +01:00
Christian Hesse
bd0075af4c log-forward: fix indention 2026-01-21 08:57:17 +01:00
Christian Hesse
e8bff72f4a collect-wireless-mac: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
eb514160e8 Merge branch 'certificate-builtin' into next 2026-01-21 08:57:17 +01:00
Christian Hesse
93db7c36ec 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-01-21 08:57:17 +01:00
Christian Hesse
e8f9b288d4 check-routeros-update: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
e40a5575c4 Merge branch 'CommitBrief' into next 2026-01-21 08:57:17 +01:00
Christian Hesse
72940ee746 bump required RouterOS version for all scripts 2026-01-21 08:57:17 +01:00
Christian Hesse
1f0f2375c6 check-perpetual-license: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
082f6e4812 Merge branch 'ExitOnError' into next 2026-01-21 08:57:17 +01:00
Christian Hesse
3b98e676c5 README: update screenshots 2026-01-21 08:57:17 +01:00
Christian Hesse
b7c0dab767 README: reword the section on builtin trust store 2026-01-21 08:57:17 +01:00
Christian Hesse
96226c71d3 check-lte-firmware-upgrade: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
0db4306795 global-functions: enable scheduler if disabled 2026-01-21 08:57:17 +01:00
Christian Hesse
3baf0bd060 mode-button: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
c76c9591d5 global-functions: $ScriptInstallUpdate: drop output on commit...
... now that we have it on loading global functions.
2026-01-21 08:57:17 +01:00
Christian Hesse
998555932d global-functions: $CertificateAvailable: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-21 08:57:17 +01:00
Christian Hesse
39f993ffbd check-health: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
86bf200bb5 global-functions: simplify the scheduler fix 2026-01-21 08:57:17 +01:00
Christian Hesse
80746d4dad mod/ssh-keys-import: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
4fe77ef238 global-functions: give commit info when laoding 2026-01-21 08:57:17 +01:00
Christian Hesse
0de3963278 INITIAL-COMMANDS: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-21 08:57:17 +01:00
Christian Hesse
5590acc86f check-certificates: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
ad8299824c global-functions: make the scheduler fix a block 2026-01-21 08:57:17 +01:00
Christian Hesse
b7df0d393a mod/scriptrunonce: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
03010ad9d9 global-functions: $ScriptInstallUpdate: use $CommitBrief 2026-01-21 08:57:17 +01:00
Christian Hesse
125af60b04 check-certificates: drop the compatibility workaround...
... and make it depend in RouterOS 7.19 and its builtin certificates.
2026-01-21 08:57:17 +01:00
Christian Hesse
5c7d0d456f certificate-renew-issued: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
8b3fae745d global-functions: $NetMask6: drop unused variable 2026-01-21 08:57:17 +01:00
Christian Hesse
5f8f5e22a7 mod/notification-telegram: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
7f888b197e global-functions: $FetchUserAgentStr: user $CommitBrief 2026-01-21 08:57:17 +01:00
Christian Hesse
223d9fc2e0 capsman-rolling-upgrade: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
969658da16 mod/notification-ntfy: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
c81967f63a global-functions: $DeviceInfo: use $CommitBrief 2026-01-21 08:57:17 +01:00
Christian Hesse
31e2e62c56 capsman-download-packages: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
6dd37e45d6 mod/notification-matrix: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
005b80b4c5 global-functions: introduce $CommitBrief 2026-01-21 08:57:17 +01:00
Christian Hesse
18f240fb77 backup-upload: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
ddf7a015c5 mod/notification-gotify: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
7096b82dea backup-partition: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
d4624689ae mod/notification-email: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
5618618d9a backup-email: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
2366122a36 mod/ipcalc: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
9041081264 backup-cloud: early exit with :exit 2026-01-21 08:57:17 +01:00
Christian Hesse
c0e802eab9 mod/inspectvar: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
345c8ef6b2 mod/bridge-port-vlan: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
920785c25b mod/bridge-port-to: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
87b80e05cb accesslist-duplicates: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
d0f2ae0033 global-functions: $SendNotification: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
f3d81f7e0d global-functions: $ScriptInstallUpdate: use $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
5443034897 global-functions: make $ExitError a wrapper for $ExitOnError 2026-01-21 08:57:17 +01:00
Christian Hesse
a8e091dde7 global-functions: introduce $ExitOnError
This is just like $ExitError, but first parameter is dropped. We will
not need it now that we can exit a script with :exit.
2026-01-21 08:57:17 +01:00
Christian Hesse
84fbe96b82 README: reword the section on device-mode
Now that we require RouterOS 7.17 *all* devices come with the
updated device-mode.
2026-01-20 19:14:41 +01:00
4 changed files with 13 additions and 24 deletions

View file

@ -4,7 +4,7 @@ Initial commands
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -4,7 +4,7 @@ RouterOS Scripts
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -50,7 +50,7 @@ temporarily.
> 💡️ **Hint**: If in doubt have a look at the badge at the top of each
> page showing the minimum version required:
> ![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-yellow?style=flat)
> ![required RouterOS version](https://img.shields.io/badge/RouterOS-7.19-yellow?style=flat)
> **Info**: The `main` branch is now RouterOS v7 only. If you are still
> running RouterOS v6 switch to `routeros-v6` branch!
@ -59,7 +59,7 @@ temporarily.
The
[device-mode ↗️](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
is a mechanism to lock down a device for security reasons, it gives
is a mechanism to to lock down a device for security reasons, it gives
fine-grained control over what features are available. You need to enable
`scheduler` and `fetch` at least, specific scripts may require additional
features.
@ -97,26 +97,15 @@ including demonstration recorded live at [MUM Europe
### The long way in detail
The update script does server certificate verification, so first step is
to establish trust.
The update script does server certificate verification, so first step is to
download the certificates.
#### Builtin trust store
RouterOS comes with a builtin trust store with several CA certificates.
If you intend **not** to trust this store jump to
[download and import certificate](#download-and-import-certificate) now.
Select the `fetch` command to trust these builtin certificates at
least, but make sure not to drop other targets:
/certificate/settings/set builtin-trust-store=fetch;
![screenshot: builtin trust store](README.d/00-builtin-trust-store.avif)
You can skip the steps regarding certificate download and import and jump
to [installation of scripts](#installation-of-scripts) now.
#### Download and import certificate
> 💡️ **Hint**: RouterOS comes with a builtin certificate store. You
> can skip the steps regarding certificate download and import and jump
> to [installation of scripts](#installation-of-scripts) if you set the
> certificates to be trusted my the `fetch` command at least. But make
> sure not to drop other targets:
> `/certificate/settings/set builtin-trust-store=fetch;`
If you intend to download the scripts from a
different location (for example from github.com) install the corresponding

View file

@ -4,7 +4,7 @@
# Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.21
# requires RouterOS, version=7.19
# requires device-mode, fetch, scheduler
#
# global functions