Commit graph

2060 commits

Author SHA1 Message Date
Christian Hesse abfc8e9191 telegram-chat: add (and increase) random delay on error
Chances are that two devices schedule the script (nearly) simultaneously.
Causing a lot of failures from fetch. Instead of forcing a retry on
*every* invocating we add (and increase) a random delay, that is
slowly decreasd on success. This should minimize failures...
2024-01-30 00:02:08 +01:00
Christian Hesse b6367b5df3 telegram-chat: fix concatenation (and retry with delay)
Ups... 😳
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 64abe7430a update list of contributors 2024-01-25 09:38:11 +01:00
Christian Hesse 3ca51f4699 INITIAL-COMMANDS: fix existing installation 2024-01-25 09:38:11 +01:00
Christian Hesse 7db94b5f3f doc/check-certificates: initial certificate import 2024-01-24 17:24:23 +01:00
Christian Hesse 7baf69e67c doc/check-certificates: add paragraph 2024-01-24 17:24:23 +01:00
Christian Hesse 468b5a18f3 check-certificates: unbreak certificate download
This was borked with a2749b2760. 😳
2024-01-24 16:13:44 +01:00
Christian Hesse 20c337d6ba INITIAL-COMMANDS: ... but rename the configuration overlay!
This should not ultimately destroy user's configuration.
2024-01-24 15:52:58 +01:00
Christian Hesse 49a83682c3 INITIAL-COMMANDS: remove before adding...
... to make sure it does not fail on (partly) installed scripts. This
should work to fix borked base installation now.
2024-01-24 11:47:26 +01:00
Christian Hesse f015f5f012 mod/notification-telegram: apply url encoding when sending 2024-01-22 16:10:48 +01:00
Christian Hesse c2fe7e4cd7 mod/notification-matrix: drop declaration of unused function 2024-01-22 16:08:34 +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 21cf6d49bb backup-upload: fix the upload symbol...
... which broke with commit 080bef89a9.
2024-01-19 17:08:55 +01:00
Christian Hesse 4b8854946d fw-addr-lists: use prepared user-agent string with fetch 2024-01-19 13:25:22 +01:00
Christian Hesse a2749b2760 check-certificates: use prepared user-agent string with fetch 2024-01-19 13:23:52 +01:00
Christian Hesse 0ad1a79d67 netwatch-dns: be move verbose on time to settle 2024-01-18 21:07:52 +01:00
Christian Hesse 8a0a4c355b global-functions: log successful loading 2024-01-18 12:53:17 +01:00
Christian Hesse bb0c82adb3 sms-forward: log warning just once 2024-01-18 10:19:22 +01:00
Christian Hesse a7619a5119 global-functions: $LogPrintOnce: support exit 2024-01-18 10:19:22 +01:00
Christian Hesse 306269f919 doc/hotspot-to-wpa: reference as WPA only...
... as this works with WPA3 as well. 😜
2024-01-18 10:05:29 +01:00
Christian Hesse abd1edcdc3 doc/hotspot-to-wpa: fix property name 2024-01-17 14:55:42 +01:00
Christian Hesse 29623a46ea global-functions: $HexToNum: use :tonum 2024-01-16 22:24:50 +01:00
Christian Hesse be4221264c INITIAL-COMMANDS: set script owner on initial creation 2024-01-16 22:01:04 +01:00
Christian Hesse 60bd9d1abc README: set script owner on initial creation 2024-01-16 22:00:13 +01:00
Christian Hesse 5fd8c8a760 netwatch-dns: check DoH server with fetch
This way we do not have to configure possibly non-functional servers to
check. The query is for doh-check.eworm.de of type TXT, the expected
answer is 'doh-check-OK'.

% dig TXT doh-check.eworm.de +https @1.1.1.1

; <<>> DiG 9.18.21 <<>> TXT doh-check.eworm.de +https @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42226
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;doh-check.eworm.de.		IN	TXT

;; ANSWER SECTION:
doh-check.eworm.de.	63791	IN	TXT	"doh-check-OK"

;; Query time: 16 msec
;; SERVER: 1.1.1.1#443(1.1.1.1) (HTTPS)
;; WHEN: Mon Jan 15 13:55:36 CET 2024
;; MSG SIZE  rcvd: 72
2024-01-15 14:07:38 +01:00
Christian Hesse 85aeeadcee netwatch-dns: check DoH server functionality...
... and try all servers one after another.
2024-01-11 15:33:03 +01:00
Christian Hesse 80db12a3e9 netwatch-dns: enable DoH certificate verification...
... if a certificate is named in configuration.
2024-01-11 09:22:32 +01:00
Christian Hesse 44a8195c37 doc/netwatch-dns: use new certificate for Cloudflare 2024-01-09 23:01:22 +01:00
Christian Hesse d6645e8157 certs: add new DigiCert certificates...
... used by Cloudflare.
2024-01-09 23:00:13 +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 8c458592f5 check-lte-firmware-upgrade: unbreak terminal detectiono
This broke with commit 50d7e1fa41b8f8a6a1379de5521798346fd1ae9f... 🫣
2024-01-07 23:13:54 +01:00
Christian Hesse 0760ea9121 check-lte-firmware-upgrade: fail on empty version string 2024-01-05 17:05:34 +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 1c26d08267 mod/ssh-keys-import: unbreak import from file
Looks like this broke in c3045f3723 where
a non-existent variable name was used.
2023-12-21 11:34:55 +01:00
Christian Hesse 0377064f65 capsman-download-packages: avaiable packages only...
... as things became more complicated with 'wifi-qcom*'.
2023-12-20 12:29:24 +01:00
Christian Hesse 5aaa24b507 capsman-download-packages: use default set for legacy capsman...
... as well - now that 'wireless' package has been split from 'routeros'
guessing kind of broke. It required several attempts and intermittent
errors in logs to get things right.
2023-12-20 12:11:12 +01:00
Christian Hesse 5fdc8d9e65 doc/mode-button: document required type of led 2023-12-14 08:54:04 +01:00
Christian Hesse f9528f0ac5 fw-addr-lists: warn on possible truncation
... as fetch truncates data at about 64kB, reported in SUP-132297.
2023-12-13 15:57:28 +01:00
Christian Hesse db5ff00b5a doc/capsman-download-packages: mention package-path 2023-12-05 11:01:14 +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 d3611cebbd mod/notification-email: $NotificationFunctions->"email": support hook for signature
You can compose your own signature by creating a function:

:global NotificationEMailSignature do={
  :global EitherOr;

  :local RouterBoard [ /system/routerboard/get ];
  :return ( \
    [ $EitherOr ($RouterBoard->"board-name") ($RouterBoard->"model") ] . " s/n " . $RouterBoard->"serial-number" . " | " . \
    "RouterOS " . [ /system/package/update/get installed-version ] . " | " . \
    "IP " . [ /ip/cloud/get public-address ]);
}
2023-12-05 00:11:19 +01:00
Christian Hesse 9fb596135e check-certificates: properly renew from template 2023-12-05 00:11:19 +01:00
Christian Hesse a12ccba29e check-certificates: improve wording 2023-12-05 00:11:19 +01:00
Christian Hesse 8de6995c4b check-certificates: add workaround for broken certificates...
... where the issuer array is borked. Or is this a RouterOS issue?

[eworm@carpo] > $InspectVar [ $ParseKeyValueStore  [ /certificate/get ISRG-Root-X2 issuer ] ]
-type-> array
  -key-> C
    -type-> str
    -value-> US,O=Internet Security Research Group,CN=ISRG Root X2

A good certificate looks like this:

[eworm@carpo] > $InspectVar [ $ParseKeyValueStore  [ /certificate/get [ find where name~"eworm.net" ] issuer ] ]
-type-> array
  -key-> C
    -type-> str
    -value-> US
  -key-> CN
    -type-> str
    -value-> E1
  -key-> O
    -type-> str
    -value-> Let's Encrypt
2023-12-04 13:05:46 +01:00