Commit graph

140 commits

Author SHA1 Message Date
Christian Hesse
5b6ed4216e global-functions: $ScriptInstallUpdate: warn just once...
... for every script on required RouterOS version.
2024-01-30 07:18:38 +01:00
Christian Hesse
4b791b7769 global-functions: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
2a4e2e0c07 send a warning on storage size 2024-01-30 00:02:08 +01:00
Christian Hesse
62f33d7b19 packages-update: support deferred reboot on auto-update
Closes #56
2024-01-30 00:02:08 +01:00
Christian Hesse
a1abfedccd global-functions: $RandomDelay: always scale to ms...
... to randomize in friction of unit.

This requires :tonsec from RouterOS 7.12.
2024-01-30 00:02:08 +01:00
Christian Hesse
16898ae997 global-functions: $RandomDelay: allow zero time, return immediately 2024-01-29 22:50:02 +01:00
Christian Hesse
e636d4194c global-functions: $RandomDelay: name the parameters 2024-01-29 22:50:02 +01:00
Christian Hesse
75a39ffaf1 global-functions: $SymbolByUnicodeName: log warning on missing name 2024-01-20 00:11:22 +01:00
Christian Hesse
86a0700efd global-functions: $SymbolByUnicodeName: name the parameter 2024-01-20 00:09:54 +01:00
Christian Hesse
8a0a4c355b global-functions: log successful loading 2024-01-18 12:53:17 +01:00
Christian Hesse
a7619a5119 global-functions: $LogPrintOnce: support exit 2024-01-18 10:19:22 +01:00
Christian Hesse
29623a46ea global-functions: $HexToNum: use :tonum 2024-01-16 22:24:50 +01:00
Christian Hesse
4249ad61df global-functions: $CertificateDownload: move delay up
We still had cases where fetch misbehaves... But this was permanent.
Perhaps we should not touch the certificate too early...
2024-01-08 00:29:18 +01:00
Christian Hesse
9a73fc526f update copyright for 2024 2024-01-01 15:25:25 +01:00
Christian Hesse
777c388b43 global-functions: $GetMacVendor: get new certificate
The service now uses: GTS CA 1P5 -> GTS Root R1
2023-12-22 14:47:54 +01:00
Christian Hesse
69af869572 mention the donation hint... 2023-12-05 00:11:19 +01:00
Christian Hesse
52b8e67309 celebrating 1.000 stars on Github! 2023-12-05 00:11:19 +01:00
Christian Hesse
1bb2871e0b global-functions: $FormatLine: use $CharacterMultiply 2023-12-04 12:08:47 +01:00
Christian Hesse
5e2e65b252 global-functions: $AlignRight: use $CharacterMultiply 2023-12-04 12:08:47 +01:00
Christian Hesse
8f24b4c490 global-functions: introduce $CharacterMultiply 2023-12-04 11:22:36 +01:00
Christian Hesse
15e347303b global-functions: $DeviceInfo: add SNMP location and contact 2023-12-04 09:33:24 +01:00
Christian Hesse
c6bf722e49 global-functions: introduce $MIN 2023-11-30 13:51:57 +01:00
Christian Hesse
495eff48de global-functions: introduce $MAX 2023-11-30 13:51:57 +01:00
Christian Hesse
080bef89a9 global-functions: $SymbolByUnicodeName: rename up-arrow -> arrow-up
... so arrows are grouped in case we add more.
2023-11-30 13:51:57 +01:00
Christian Hesse
4e1d54d733 global-functions: $SymbolForNotification: properly append space to alt text 2023-11-30 13:51:57 +01:00
Christian Hesse
1cc0e3429b global-functions: introduce $AlignRight 2023-11-23 14:41:46 +01:00
Christian Hesse
890cd6c58d global-functions: introduce $HumanReadableNum 2023-11-15 14:34:40 +01:00
Christian Hesse
4c3430fbb6 notify about parted scripts for wifi package 2023-11-15 14:34:40 +01:00
Christian Hesse
e36ac19c8b global-functions: drop $Read
... which is no longer required now that RouterOS 7.12beta1
provides /terminal/ask.
2023-11-09 15:42:07 +01:00
Christian Hesse
2d7efd8d6c mod/notification-matrix: introduce $SetupMatrix{Authenticate,JoinRoom} for setup
Well, now that we have a JSON parser... Let's improve the user
experience a bit.
2023-11-09 15:34:10 +01:00
Christian Hesse
1265caca60 mod/ssh-keys-import: calculate fingerprint...
... and store it in key-owner, which is descriptive only.

This requires RouterOS 7.12beta1 for the 'transform' property
for ':convert' command.
2023-11-09 15:08:36 +01:00
Christian Hesse
fe2641ae0f global-functions: $ParseDate: drop code for old format...
... and increase required RouterOS.

We should probably wait some time before merging this: Even current
versions have some hidden places with old format:

[admin@MikroTik] > /system/resource/print
                     [...]
                  version: 7.10.2 (stable)
               build-time: Jul/12/2023 09:45:11
                     [...]

(Though this is written with capital letter and fails anyway...)

Something similar goes for `/ip/neighbor`, where format depends on
remote devices. Does anybody need to parse this?
2023-11-07 13:41:59 +01:00
Christian Hesse
3474b9a15c dhcp-to-dns: allow multiple records for one mac address
Now that we can have differnt name suffixes via networks it makes sense
to allow multiple records for one mac address.

Also update the wording for messages...
2023-10-27 14:13:58 +02:00
Christian Hesse
72b4851255 global-functions: introduce $LogPrintOnce
This does work just like $LogPrintExit2, except it acts just *once* for
each message, until device is rebooted.
2023-10-27 08:42:32 +02:00
Christian Hesse
8f75c17e0b global: switch eworm.de to new certificate chain (E1 / ISRG Root X2)
old chain: R3 / ISRG Root X1
new chain: E1 / ISRG Root X2

No user interaction or migration is required for existing installations
as we install 'E1' and 'ISRG Root X2' for some time already.
2023-10-26 22:15:05 +02:00
Christian Hesse
61834297d7 global-functions: $ParseJson: prevent infinite loop...
... which could happen on corrupted or truncated input.
2023-10-25 08:57:39 +02:00
Christian Hesse
9138c17f8c global-functions: $ParseJson: return array as ... array 😜
No need to assemble the string here, just to split it again later.
2023-10-19 08:42:29 +02:00
Christian Hesse
286e3d9cf9 global-functions: $ScriptInstallUpdate: use $EitherOr 2023-10-17 14:05:03 +02:00
Christian Hesse
2ab3468700 global-functions: $ScriptInstallUpdate: restore indention
No functional change.
2023-10-17 14:05:03 +02:00
Christian Hesse
382f928568 global-functions: $ScriptInstallUpdate: drop support for scripts from storage
Nobody ever used that, no?
(Well, except me - just before I implemented fetching. 😜)
2023-10-17 14:05:03 +02:00
Christian Hesse
7a1ffb659c global-functions: $ScriptInstallUpdate: rename variable 2023-10-17 14:05:03 +02:00
Christian Hesse
c0a734fa21 global-functions: $ScriptInstallUpdate: use pushpin as bullet 2023-10-17 14:05:03 +02:00
Christian Hesse
cfc8c4f1ea global-functions: $SymbolForNotification: support fallback without symbols 2023-10-17 14:05:03 +02:00
Christian Hesse
5932586ee4 introduce mod/notification-ntfy...
... for sending notifications via Ntfy (https://ntfy.sh/).

TODO: use proper formatting once supported in Android app:
https://github.com/binwiederhier/ntfy/issues/889
2023-10-17 14:05:03 +02:00
Christian Hesse
24823441c3 log-forward: use colorful bullets to indicate severity 2023-10-17 14:05:03 +02:00
Christian Hesse
1b00f93fc6 global-functions: $ScriptInstallUpdate: http-header-field expects an array 2023-10-17 14:05:03 +02:00
Christian Hesse
da0a37802d global-functions: $CertificateDownload: http-header-field expects an array 2023-10-17 14:05:03 +02:00
Christian Hesse
c0aab0fead global-functions: $ParseJson: properly handle array 2023-10-16 23:43:58 +02:00
Christian Hesse
3b9df48721 global-functions: $ParseJson: prepare elif-workaround 2023-10-16 23:43:58 +02:00
Christian Hesse
140ec1a3a2 global-functions: $ParseJson: use temporary variables 2023-10-16 23:43:58 +02:00
Christian Hesse
fed7f2da46 mod/notification-telegram: drop support for non-fixed width font 2023-10-16 15:27:14 +02:00
Christian Hesse
399d952ac2 telegram-chat: act on reply from self 2023-10-16 13:11:20 +02:00
Christian Hesse
7df4f9e78c global-functions: $ParseJson: handle outher curly brackets 2023-10-16 11:51:04 +02:00
Christian Hesse
bb899b1fb0 global-functions: $ParseJson: drop superfluous substraction 2023-10-16 11:51:04 +02:00
Christian Hesse
080b3cbf9d global-functions: make $ParseJson global 2023-10-16 11:51:04 +02:00
Christian Hesse
4ddc6be585 global-functions: split off $FormatMultiLines ...
... to format multiple lines from an array.
2023-09-18 07:55:05 +02:00
Christian Hesse
5349c9b52e global-functions: $EitherOr: properly handle time values 2023-09-15 09:54:59 +02:00
Christian Hesse
7b47ed7ea5 check-routeros-update: support update from specific neighbor(s)
... by matching the identity property.
2023-08-31 09:40:09 +02:00
Christian Hesse
047c74a4b3 global-functions: prepare user-agent for fetch in global variable 2023-08-18 15:23:20 +02:00
Christian Hesse
92aca1aac0 news and migration for wifiwave2 2023-08-15 11:26:18 +02:00
Christian Hesse
08e9634154 global-functions: $MkDir: drop extra block, restore indention
We had this to make the previous commit cleaner. No functional change.
2023-06-28 11:29:02 +02:00
Christian Hesse
5db9a71802 global-functions: $MkDir: drop old code with smb workaround...
... and increase required RouterOS.
2023-06-28 11:29:02 +02:00
Christian Hesse
16a551a0ee hotspot-to-wpa-cleanup: drop hard-coded server name, find by comment 2023-06-28 11:26:51 +02:00
Christian Hesse
f8a2b88692 hotspot-to-wpa: support non-local users
This has some limitations, though: The password is not known and
additional configuration can not be given in user's comment.
2023-06-28 11:04:13 +02:00
Christian Hesse
0af1fa4009 global-functions: escaping question mark is no longer required 2023-06-27 09:14:36 +02:00
Christian Hesse
640b8fd401 global-functions: $IsTimeSync: calculate with uptime, drop scheduler 2023-06-27 09:14:36 +02:00
Christian Hesse
6469825398 global-functions: $IsTimeSync: reset ntp client when "waiting"
Every now and then the ntp client stays in status "waiting" forever...
This happens if the server answers, but is not accurate enough. Unlike
with connection failure the address is not rotated. (SUP-120012)

Let's reset it... Should help with a pool address (like pool.ntp.org)
at least.
2023-06-22 22:45:32 +02:00
Christian Hesse
e19e33d0a8 introduce fw-addr-lists 2023-06-13 20:26:55 +02:00
Christian Hesse
196fe1b010 global-functions: $CertificateDownload: add proper version in user agent 2023-06-13 12:53:38 +02:00
Christian Hesse
d2883e6f43 global-functions: $CertificateDownload: add a delay
For any reason the imported certificate(s) is/are not available for
fetch command immediately. Let's add a delay here... It should not hurt
as certificates are not imported that often.
2023-06-01 21:59:52 +02:00
Christian Hesse
0b8979e5b5 global-functions: $ScriptInstallUpdate: handle scripts with DOS line endings
If the script is converted to DOS line endings (\r\n) on the device it
was no longer handled by $ScriptInstallUpdate. Let's change that...
2023-06-01 21:59:52 +02:00
Christian Hesse
60f863871c global-functions: $ParseDate: handle date in ISO standard format
This was introduced with RouterOS 7.10beta5...

https://xkcd.com/1179/ 😜
2023-05-10 20:02:44 +02:00
Christian Hesse
bafd71344d global-functions: introduce $ParseDate
The extra indention is intended for a later change.
2023-05-10 20:02:44 +02:00
Christian Hesse
c8500dddd0 mod/ssh-keys-import: make ssh-keys-import a module 2023-04-26 10:31:23 +02:00
Christian Hesse
ee94024dca dhcp-to-dns: get domain from dhcp server's network definition 2023-04-24 22:26:26 +02:00
Christian Hesse
fb12aabf3e global-functions: $DeviceInfo: use $FormatLine 2023-04-24 22:26:26 +02:00
Christian Hesse
cb338c76a8 global-functions: introduce $FormatLine 2023-04-24 22:26:26 +02:00
Christian Hesse
9617095022 check-certificates: try all SANs for download 2023-04-07 23:36:09 +02:00
Christian Hesse
415c4144f2 global-functions: $VersionToNum: support "alpha" in version string 2023-03-30 20:58:19 +02:00
Christian Hesse
5f374c469a global-functions: $RequiredRouterOS: accept "alpha" in version string 2023-03-30 20:50:55 +02:00
Christian Hesse
f2e8115272 global-functions: $MkDir: make directory by adding file
This is new functionality in RouterOS 7.9beta4, where new file can be
added with `/file/add ...`. This also creates directories for the full
path.
2023-03-28 15:43:49 +02:00
Christian Hesse
7fdec1abed global-functions: $MkDir: add extra block for indention...
... to make the next commit cleaner. No functional change.
2023-03-28 15:43:35 +02:00
Christian Hesse
d3ca506394 global-functions: $MkDir: create tmpfs in local function 2023-03-28 12:05:47 +02:00
Christian Hesse
7293306f76 global-functions: $MkDir: return false on error 2023-03-28 12:05:47 +02:00
Christian Hesse
847f0a4564 global-functions: $MkDir: drop unused function 2023-03-28 12:05:47 +02:00
Christian Hesse
aac8709881 dhcp-to-dns: always create A record with mac address...
... and an optional CNAME with host name.
2023-03-22 21:53:32 +01:00
Christian Hesse
650c362ed9 netwatch-notify: support note in notification 2023-03-20 12:35:34 +01:00
Christian Hesse
56ae457d77 global-functions: $ScriptInstallUpdate: add proper version in user agent
This allows me to identify what RouterOS versions are run on devices
fetching my scripts, which may helps to decide what incompatible changes
to push.
2023-03-10 09:46:16 +01:00
Christian Hesse
e902e3fdd5 global-functions: $ScriptInstallUpdate: make sure not to match self 2023-03-07 22:26:01 +01:00
Christian Hesse
a832fd04ef rename scripts and add file extension ".rsc"
No functional change for the user... The migration is done
automatically.
2023-03-07 22:26:01 +01:00