Commit graph

2846 commits

Author SHA1 Message Date
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
Christian Hesse
4bfb591fa0 bump required RouterOS version for all scripts 2025-02-07 17:44:41 +01:00
Christian Hesse
49d9fb1ffd global-functions: $RmDir: add debug output 2025-02-07 17:44:41 +01:00
Christian Hesse
7233dea5bb global-functions: $RmFile: add debug output 2025-02-07 17:44:41 +01:00
Christian Hesse
727495d9c4 global-functions: introduce $RmDir 2025-02-07 17:44:41 +01:00
Christian Hesse
4542c2b19e global-functions: introduce $RmFile 2025-02-07 17:44:41 +01:00
Christian Hesse
0fb5fd0323 global-functions: $MkDir: create directory directly...
... instead of file inside directory. This requires RouterOS 7.15, so
bumping requirement.
2025-02-07 17:44:32 +01:00
Christian Hesse
dbdc3e4718 packages-update: ignore available packages
This was introduced with RouterOS 7.18beta2 to list and install available
packages. We do not want to install all of them. 😝
2025-02-07 17:16:37 +01:00
Christian Hesse
dafd95d44a packages-update: disable random delay for backup 2025-02-06 21:26:39 +01:00
Christian Hesse
7b660d0952 packages-update: move configuration variables up 2025-02-06 21:24:20 +01:00
Christian Hesse
23d38927bc check-health: split off plugins...
... from 'check-health', so the script works on all devices to monitor
CPU and RAM. The supported plugins for sensors in hardware are installed
automatically.
2025-02-05 14:39:59 +01:00
Christian Hesse
84ba3a463a doc/netwatch-dns: warn on different certificate...
... based on indicated server name.

Currently this is true for 8.8.8.8 (GTS Root R1) and dns.google (GTS Root R4).
2025-02-05 10:00:26 +01:00
Christian Hesse
27c92b4382 doc/netwatch-dns: switch exmample to cloudflare-dns.com 2025-02-05 10:00:26 +01:00
Christian Hesse
6501c98c82 certs: dns.google switched to 'GTS Root R4'
Note that 8.8.8.8 is still at 'GTS Root R1'...
2025-02-05 10:00:26 +01:00
Christian Hesse
bfe5f20920 check-health: remove trailing whitespaces 2025-02-04 22:20:18 +01:00
Christian Hesse
3024b246b5 check-health: remove extra line break 2025-02-04 12:03:24 +01:00
Christian Hesse
61f3c26199 doc/check-health: highligh note on bad initial state 2025-02-03 14:36:25 +01:00
Christian Hesse
3ad7ccd3d6 check-certificates: check to characters for star-dot 2025-02-03 10:05:35 +01:00
Christian Hesse
eabe3f6e95 check-certificates: pass real and modified name into function 2025-01-31 21:40:51 +01:00