Compare commits

..

50 commits

Author SHA1 Message Date
Christian Hesse
b88c2a14cc telegram-chat: Support trusted group chat ids
But be warned: Adding a person to a trusted group will give
her/him administrative control over the device(s) - without
changes on the device itself!
2025-05-12 16:57:05 +02:00
Christian Hesse
d7628f0310 mod/notification-telegram: fix indention 2025-05-12 16:57:00 +02:00
Christian Hesse
9f24bb0a26 fw-addr-lists: for IPv6 the CIDR is always expected 2025-05-12 12:09:24 +02:00
Christian Hesse
950a4b94ba mod/notification-email: add the link symbol 2025-05-12 12:09:24 +02:00
Christian Hesse
8644a7f4a3 mod/notification-email: properly truncate the body
Truned out that the size limit for e-mail message/body is anywhere just
below 64kB... So truncate  at about 62.000 bytes.
2025-05-12 12:09:24 +02:00
Christian Hesse
8b2ae87892 mod/notification-email: add error handling when sending mail 2025-05-12 12:09:24 +02:00
Christian Hesse
8da55ba82d mod/inspectvar: replace only when matching 2025-05-12 12:09:24 +02:00
Christian Hesse
e75d986fe7 mod/inspectvar: remove CR, replace LF 2025-05-12 12:09:24 +02:00
Christian Hesse
8019d6b788 mod/inspectvar: print the length for strings 2025-05-12 12:09:24 +02:00
Christian Hesse
6e0f9c26cc mod/inspectvar: use $CharacterMultiply 2025-05-12 12:09:24 +02:00
Christian Hesse
2d4316da3f Merge branch 'onerror' into next 2025-05-12 12:09:24 +02:00
Christian Hesse
93aef0f6d5 sms-forward: add error handling on message removal 2025-05-12 12:09:24 +02:00
Christian Hesse
07551cd562 update-tunnelbroker: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
fee36452b9 sms-forward: delay after removal...
... to give the SIM card some time to succeed. Removing several messages
one after another fails without this.
2025-05-12 12:09:24 +02:00
Christian Hesse
4222d11f11 unattended-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
f095b581e7 global-functions: $ScriptInstallUpdate: set config and functions not ready...
... before reload. This should fix some corner cases where scripts ran
with broken configuration or functions.

Also do reload both - configuration and functions - to simplify the
function.
2025-05-12 12:09:24 +02:00
Christian Hesse
3d10fd82c8 telegram-chat: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
661aad522b global-config: add another visual hint 2025-05-12 12:09:24 +02:00
Christian Hesse
414870f051 sms-forward: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
4561b17dbf global-config: add another comment with visual hint 2025-05-12 12:09:24 +02:00
Christian Hesse
f18930688e netwatch-notify: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
6ccc37334c netwatch-dns: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
4b4346d0b4 mod/ssh-keys-import: fix error condition 2025-05-12 12:09:24 +02:00
Christian Hesse
937ac0aaba mod/ssh-keys-import: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
fdcd5f8b01 mod/scriptrunonce: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
954bee9949 mode-button: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
5caf54b26e mod/notification-gotify: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
29c6151d1e mod/notification-matrix: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
0acb501ff5 mod/notification-ntfy: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
9b9233a013 mod/notification-telegram: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
8c7cd61892 lease-script: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
ee9d61e28a gps-track: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
48eca31f3c global-functions: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
55e568414c global-functions: $ValidateSyntax: add debug output 2025-05-12 12:09:24 +02:00
Christian Hesse
912061b624 global-functions: $ValidateSyntax: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
172ca2c709 global-functions: $ScriptInstallUpdate: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
c0ea72ec7a global-functions: $RmFile: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
4cdcd081e5 global-functions: $RmDir: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
9b46c36641 global-functions: $MkDir: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
efd259f868 global-functions: $GetMacVendor: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
d419e58abd global-functions: $FetchHuge: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
0e891b0963 global-functions: $DownloadPackage: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
c36e303e01 global-config: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
fc742edc58 fw-addr-lists: adopt changes in wording 2025-05-12 12:09:24 +02:00
Christian Hesse
cefc9d7e4b fw-addr-lists: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
72a7f20a64 check-routeros-update: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
5cc8b7281a check-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
89f569c7c0 check-health: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
3422783191 backup-upload: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
Christian Hesse
48336ac82c backup-partition: :do ... on-error=... -> :onerror ... do=... 2025-05-12 12:09:24 +02:00
3 changed files with 8 additions and 6 deletions

View file

@ -8,7 +8,6 @@
# Warning: Do *NOT* copy this line to overlay!
:global GlobalConfigReady false;
# || ... but
# \||/ start
# \/ here!
@ -271,10 +270,11 @@
"cert2-cn"="4n0th3r-s3cr3t";
};
# /\ Warning: Do *NOT* copy
# /\7\ the code below to overlay!
# /_()_\ Things *will* break!
#
# load custom settings from overlay and snippets
# /\ Warning: Do *NOT*
# /\7\ copy this code
# /_()_\ to overlay!
:foreach Script in=([ /system/script/find where name="global-config-overlay" ], \
[ /system/script/find where name~"^global-config-overlay.d/" ]) do={
:onerror Err {

View file

@ -189,7 +189,7 @@
:local HTTPData ("chat_id=" . $ChatId . "&disable_notification=" . ($Notification->"silent") . \
"&reply_to_message_id=" . ($Notification->"replyto") . "&message_thread_id=" . $ThreadId . \
"&disable_web_page_preview=true&parse_mode=MarkdownV2");
"&disable_web_page_preview=true&parse_mode=MarkdownV2");
:onerror Err {
:if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={
$LogPrint warning $0 ("Downloading required certificate failed.");

View file

@ -107,7 +107,9 @@
:local ThreadId [ $IfThenElse ($Message->"is_topic_message") ($Message->"message_thread_id") "" ];
:foreach IdsTrusted in=($TelegramChatId, $TelegramChatIdsTrusted) do={
:if ($From->"id" = $IdsTrusted || $From->"username" = $IdsTrusted) do={
:if ($From->"id" = $IdsTrusted || \
$From->"username" = $IdsTrusted || \
$Chat->"id" = $IdsTrusted) do={
:set Trusted true;
}
}