Commit graph

2765 commits

Author SHA1 Message Date
Christian Hesse
0d69f8952c global-functions: introduce $ExitError...
... as a simple macro to print error message on unintentional error.
2024-12-09 11:49:50 +01:00
Christian Hesse
09e8b1d219 netwatch-dns: explicitly expect type=A...
... which is provided since 7.16beta7 (but require next stable release
7.16 as that is available meanwhile).
2024-11-27 11:56:44 +01:00
Christian Hesse
6548f83ef4 dhcp-to-dns: explicitly expect type=A...
... which is provided since 7.16beta7 (but require next stable release
7.16 as that is available meanwhile).

I had this on my wishlist for a long time, and opened an issue in
March 2023 about it (SUP-111312).

Back then I changed the code to support both, see commit
779b3b8872.
2024-11-27 11:56:44 +01:00
Christian Hesse
e851cd5ad0 mod/ssh-keys-import: require RouterOS 7.16
Actually the requirement bumped with the change in commits:

* 9c945b1a32
  mod/ssh-keys-import: $SSHKeysImportFile: simplify looping lines

* 1f526b3561
  mod/ssh-keys-import: $SSHKeysImport: split with `:deserialize`
2024-11-27 11:56:09 +01:00
Christian Hesse
794525b706 fw-addr-lists: require RouterOS 7.16
Actually the requirement bumped with the change in commit:

* 084c246ef0
  fw-addr-lists: simplify looping lines
2024-11-27 10:00:27 +01:00
Christian Hesse
4d8dce9769 fw-addr-lists: spamhaus.org returned to 'GTS Root R4' 2024-11-22 14:06:22 +01:00
Christian Hesse
08ad4e5194 mode-button: do not act on disabled LED 2024-11-15 23:09:24 +01:00
Christian Hesse
53b6f7720e mode-button: catch runtime errors in executed code 2024-11-15 23:09:24 +01:00
Christian Hesse
1beda3aa7c mode-button: fix the caller parameter to $LogPrint
This is inside a function, so use just $0 here.
2024-11-15 23:01:22 +01:00
Christian Hesse
5b09469cc6 packages-update: drop check for device-mode downgrade...
... as things have been revised and this specific setting was removed.
2024-11-14 21:03:07 +01:00
Christian Hesse
a224fbc424 hotspot-to-wpa-cleanup: revert display of timeout value...
... as the timeout is a time value, and showing "4w00:00:00" (with lots
of zeros) is not any better. 😜

This reverts commit f1533b8962.
2024-11-13 08:59:30 +01:00
Christian Hesse
e5c3aeb5cd hotspot-to-wpa-cleanup: prepare real timeout value in variable...
... to make sure it is not re-calculated for every single lease.
2024-11-13 08:57:05 +01:00
Christian Hesse
ae655646ba hotspot-to-wpa-cleanup: clean up daily only 2024-11-12 18:02:26 +01:00
Christian Hesse
f1533b8962 hotspot-to-wpa-cleanup: use the timeout in message...
... not the actual value.
2024-11-12 17:53:30 +01:00
Christian Hesse
a545d0d39e check-routeros-update: always exit early if up to date...
... and just make the output and log dependent on terminal.
2024-11-12 17:46:02 +01:00
Christian Hesse
04172f0438 check-routeros-update: make invalid version string a warning 2024-11-12 17:42:54 +01:00
Christian Hesse
d97f63fa5a check-routeros-update: add specific message for empty version string 2024-11-12 17:41:54 +01:00
Christian Hesse
6c8fa8e639 check-routeros-update: replace hard-coded version 2024-11-12 17:40:05 +01:00
Christian Hesse
1f526b3561 mod/ssh-keys-import: $SSHKeysImport: split with :deserialize 2024-11-08 09:16:25 +01:00
Christian Hesse
0837391c38 mod/ssh-keys-import: $SSHKeysImportFile: let :deserialize split the fields 2024-11-08 09:16:18 +01:00
Christian Hesse
9c945b1a32 mod/ssh-keys-import: $SSHKeysImportFile: simplify looping lines 2024-11-08 09:15:45 +01:00
Christian Hesse
084c246ef0 fw-addr-lists: simplify looping lines
With `:deserialize` the **record** separator is always a new line. The
property `delimiter=` is a **field** reparator, so you can parse a lines
into an array.

We do not want (or need) that, so use new line as field separator. This
will result in an array with just one element, and we use that.

Also convert the data to line feed explicitly, just to be sure.
2024-11-06 22:42:40 +01:00
Christian Hesse
31dfdf7e62 doc/netwatch-dns: link to 'certificate name from browser' 2024-11-02 21:23:04 +01:00
Christian Hesse
d213369e73 doc/fw-addr-lists: link to 'certificate name from browser' 2024-11-02 21:23:04 +01:00
Christian Hesse
c5740c2328 doc/mod/notification-ntfy: link to 'certificate name from browser' 2024-11-02 21:23:04 +01:00
Christian Hesse
af942d90d3 doc/mod/notification-matrix: link to 'certificate name from browser' 2024-11-02 21:23:04 +01:00
Christian Hesse
3c0852d6b8 introduce CERTIFICATES, guide to find root certificate 2024-11-02 21:23:04 +01:00
Christian Hesse
3506f71071 global-functions: $CertificateAvailable: fail without CommonName 2024-10-30 22:49:48 +01:00
Christian Hesse
a6584170c3 certs: check cert for matrix.org 2024-10-29 15:00:26 +01:00
Christian Hesse
3169270dbd doc/mod/notification-matrix: better document certificate import 2024-10-29 15:00:26 +01:00
Christian Hesse
e803f8b3c0 ipv6-update: create a dynamic address-list entry only
This should make sure that the script runs once after reboot, even if
the prefix does not change.

An existing static entry needs to be removed to make this work!

https://github.com/eworm-de/routeros-scripts/issues/85
2024-10-25 18:20:17 +02:00
Christian Hesse
d022c87651 ipv6-update: ignore if address was acquired
https://github.com/eworm-de/routeros-scripts/issues/85
2024-10-23 21:55:34 +02:00
Christian Hesse
7229c756af fw-addr-lists: spamhaus.org requires 'ISRG Root X1' now 2024-10-23 20:17:44 +02:00
Christian Hesse
07c9576377 packages-update: check for explicit state...
... as all device-mode properties are given since RouterOS 7.14beta4.

Let's assume we do not have to care about RouterOS 7.14beta2 any more...
As older versions will not match the check we can now merge right away.
2024-10-23 20:17:44 +02:00
Christian Hesse
435f70999c backup-partition: drop warning on lock in device-mode
... as switching partitions is possible again in RouterOS 7.17beta4.
2024-10-22 19:32:19 +02:00
Christian Hesse
71c58c6afb doc/netwatch-notify: fix typo(s) 2024-10-10 22:32:46 +02:00
Christian Hesse
f7f50a9d45 doc/netwatch-notify: give an extra example for resolving AAAA records 2024-10-10 22:24:56 +02:00
Christian Hesse
82e3e7a9fc doc/netwatch-notify: always give a host...
... as that is a required property. Any ip address is fine, it is
changed anyway.
2024-10-10 22:20:31 +02:00
Christian Hesse
85a7a16c15 backup-partition: log the warning just once 2024-10-09 14:30:29 +02:00
Christian Hesse
c955c94098 update list of contributors 2024-10-02 14:02:29 +02:00
Christian Hesse
98e62e3eac update list of contributors 2024-10-01 21:42:20 +02:00
Ignacio Serrano
5135e836b8 mod/notification-ntfy: fix ntfy overrides 2024-10-01 20:32:37 +02:00
Christian Hesse
f75e701be3 log-forward: get last message from log...
... not only from matched massages.
2024-09-30 21:51:31 +02:00
Christian Hesse
f2576cf558 packages-update: give warning on lock in device-mode
RouterOS 7.17beta2 introduced some extra security measures, including
some to prevent downgrade attacks for the installation. Detect early
and exit with message and error.

https://help.mikrotik.com/docs/display/ROS/Device-mode
2024-09-30 16:23:50 +02:00
Christian Hesse
1776b8f50b backup-partition: give warning on lock in device-mode
RouterOS 7.17beta2 introduced some extra security measures, including
some to prevent downgrade attacks for the installation. Thus switching
partitions (which can hold quite old installations) is denied by
device-mode now by default. Warn about that...

https://help.mikrotik.com/docs/display/ROS/Device-mode
2024-09-30 16:23:43 +02:00
Christian Hesse
c2c72818de global-functions: $CertificateDownload: add another check...
... that the certificate is really available.

Turns out that mkcert.org ships certificates where OU or whatever
matches - that's not what we want.
2024-09-26 15:24:05 +02:00
Christian Hesse
60aa553219 hotspot-to-wpa-cleanup: only match access-list with mac-address 2024-09-25 11:01:40 +02:00
Christian Hesse
c708832b69 check-routeros-update: use $VersionToNum to calculate bitmask 2024-09-16 11:54:02 +02:00
Christian Hesse
734a80ba82 backup-partition: use $VersionToNum to calculate bitmask 2024-09-13 10:29:06 +02:00
Christian Hesse
41b19b045a global-functions: $VersionToNum: support "zero"...
... to have a clean way to generate bitmasks.

    [admin@mikrotik] > :put [ $VersionToNum 0.255zero0 ]
    16711680
    [admin@mikrotik] > :put 0x00ff0000
    16711680

Once implemented everywhere the internal calculation could be
changed easily.
2024-09-13 10:22:06 +02:00