Commit graph

3014 commits

Author SHA1 Message Date
Christian Hesse
b11be59b08 README: quote the certificate file name 2025-02-27 10:52:52 +01:00
Christian Hesse
24de060904 Merge branch 'check-certificates' into next 2025-02-27 10:52:19 +01:00
Christian Hesse
14195c51ca check-certificates: try PKCS#12 before PEM...
... as that is more likely to have a private key.

Is that true? 🤨
2025-02-26 18:25:58 +01:00
Christian Hesse
e833dfcf25 check-certificates: simplify return from function...
... and also break earch on success.
2025-02-26 18:05:32 +01:00
Christian Hesse
512c54bd59 check-certificates: ... and even more 2025-02-26 18:05:32 +01:00
Christian Hesse
3d40b4419d check-certificates: add more debug output 2025-02-26 18:03:45 +01:00
Christian Hesse
a6d4e7e82c check-certificates: drop dot from type...
... and add it in file name.
2025-02-26 18:03:17 +01:00
Christian Hesse
f6c2225f68 check-certificates: catch and ignore import error
Hmm... 🤨 When was that runtime error introduced? I *think* it
worked before.
2025-02-26 13:57:51 +01:00
Christian Hesse
53b13b295a mod/notification-telegram: introduce $GetTelegramChatId 2025-02-25 22:37:30 +01:00
Christian Hesse
4eafcaa3ac telegram-chat: say hello when awaiting commands 2025-02-25 22:16:48 +01:00
Christian Hesse
c33eb41c9c global-functions: $DeviceInfo: add license level, re-order 2025-02-25 17:55:26 +01:00
Christian Hesse
78f9687558 Merge branch 'telegram-topics' into next 2025-02-25 17:55:26 +01:00
Christian Hesse
e5de9de391 notify on support for Telegram group topics 2025-02-25 17:55:26 +01:00
Christian Hesse
7928c5f054 telegram-chat: support reply in group's topic 2025-02-25 17:55:26 +01:00
Christian Hesse
757fa60e6f telegram-chat: make $IsReply a boolean...
... and check for correct data type.

We need this for a group with topic feature enabled, as that variable is
set there, but is is an array.
2025-02-25 17:55:26 +01:00
Christian Hesse
a22b62f588 mod/notification-telegram: support sending to group's topic...
... when a group has enabled the "Topics" feature.
2025-02-25 17:55:12 +01:00
Christian Hesse
cad104879c mod/notification-telegram: simplify the queue...
... and pass http-data as a complete sting.
2025-02-24 15:18:53 +01:00
Christian Hesse
58da92e36a global-functions: $WaitForFile: drop the warning on file handling breakage...
... but keep the workaround for now - just to be sure.
2025-02-19 22:21:03 +01:00
Christian Hesse
2c92c78b46 global-functions: $ScriptInstallUpdate: also show commit info 2025-02-17 13:55:44 +01:00
Christian Hesse
75633872aa global-functions: $DeviceInfo: also show commit info 2025-02-17 13:55:36 +01:00
Christian Hesse
dafcc1a0cb global-functions: $RmFile: fix type safeguard
Ups... 🫣
The type is not just literal 'file' - but what ever type the file is,
like 'backup', 'package', 'script', '.conf file', ...

So let's match those types we do *not* want to remove.

Fixes: https://github.com/eworm-de/routeros-scripts/issues/90
2025-02-13 17:58:48 +01:00
Christian Hesse
0199ea8884 global-functions: $ScriptInstallUpdate: show commit id (if available) 2025-02-13 09:50:22 +01:00
Christian Hesse
584e507fd1 global-functions: $DeviceInfo: show commit id (if available) 2025-02-13 09:03:05 +01:00
Christian Hesse
5715bc7b57 mod/scriptrunonce: always give proper return code 2025-02-12 17:40:27 +01:00
Christian Hesse
1c957dbc6d mod/scriptrunonce: resolve nested conditions 2025-02-12 17:40:27 +01:00
Christian Hesse
b7b3b43f3b mod/scriptrunonce: use $FetchHuge 2025-02-12 17:40:27 +01:00
Christian Hesse
df631b987d fw-addr-lists: add a collective list in default configuration 2025-02-12 17:40:27 +01:00
Christian Hesse
c8759381e9 global-functions: $WaitForFile: check that we can get properties
Looks like RouterOS 7.18beta2 brings more breakage. Having a file
available in listing is just the first step now. We also need to make
sure that the file properties are accessible... 🤪

I have seen this taking several tens of seconds at least... 🤪🤪 So
let's just try until we have properties available, or the file vanishes.

Reported as SUP-179200. 🤞
2025-02-12 10:49:38 +01:00
Christian Hesse
d41f758550 introduce DEBUG info 2025-02-12 10:49:34 +01:00
Christian Hesse
e1c561dd91 global-functions: $MkDir: add debug output 2025-02-11 14:56:43 +01:00
Christian Hesse
4d0b4a1ff4 fw-addr-lists: these lists are deprecated and discontinued
Any alternatives around?
2025-02-11 14:30:14 +01:00
Christian Hesse
8af67af462 doc/log-forward: mention ntfy 2025-02-10 15:31:20 +01:00
Christian Hesse
da280586b5 doc/log-forward: add a hint on defaults 2025-02-10 15:31:20 +01:00
Christian Hesse
2e42f7963c mod/notification-ntfy: use empty strings as default...
... which should be fine now that the credentials are not passed with
fetch's properties, but as properly formatted authentication header.
2025-02-10 15:23:50 +01:00
Christian Hesse
fc3beac83b log-forward: make empty string a special meaning 2025-02-10 15:23:50 +01:00
Christian Hesse
fefe11d1e8 Merge branch 'rmdir-rmfile' into next
RouterOS 7.18beta2 comes with some severe issues in file handling,
probably racy conditions. Let's move file (and directory) removal to
functions, so errors can be caught and ignored 🤪 from a central place.
2025-02-10 15:23:50 +01:00
Christian Hesse
b156fc43cf telegram-chat: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
0fea300fea mod/ssh-keys-import: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
6570a84904 check-certificates: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
63db96bdcc capsman-download-packages: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
88ff031368 backup-upload: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
81ba47a07d backup-upload: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
d748b69142 backup-cloud: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
f5f00b70e3 global-functions: $MkDir: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
4760515add global-functions: $FetchHuge: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
d19b90df08 global-functions: $FetchHuge: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
ea8ec6b580 global-functions: $DownloadPackage: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
dbdf295244 global-functions: $CertificateDownload: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
82020ddd73 global-functions: $RmDir: fail on wrong type 2025-02-10 15:23:50 +01:00
Christian Hesse
a8e5b5226b global-functions: $RmFile: fail on wrong type 2025-02-10 15:23:50 +01:00