Compare commits

..

48 commits

Author SHA1 Message Date
Christian Hesse
f1af3e1dbc fw-addr-lists: for IPv6 the CIDR is always expected 2025-05-11 22:02:18 +02:00
Christian Hesse
b6886d83d0 mod/notification-email: add the link symbol 2025-05-08 22:03:56 +02:00
Christian Hesse
fc95ea3852 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-08 22:03:56 +02:00
Christian Hesse
6abe1554b5 mod/notification-email: add error handling when sending mail 2025-05-08 13:36:25 +02:00
Christian Hesse
aa1504d2bd mod/inspectvar: replace only when matching 2025-05-08 13:36:25 +02:00
Christian Hesse
ee80914d76 mod/inspectvar: remove CR, replace LF 2025-05-08 11:36:50 +02:00
Christian Hesse
d955ce45a7 mod/inspectvar: print the length for strings 2025-05-08 11:12:02 +02:00
Christian Hesse
98f5e2b67c mod/inspectvar: use $CharacterMultiply 2025-05-08 11:07:39 +02:00
Christian Hesse
ffeec4b078 Merge branch 'onerror' into next 2025-05-08 10:36:20 +02:00
Christian Hesse
a2be20ea2f update-tunnelbroker: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
c3b1784c4e unattended-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
08aadc6ae4 telegram-chat: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
cc25d55c2c sms-forward: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
8c984b4cdf netwatch-notify: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
bc0204ddb3 netwatch-dns: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
7f708473cf mod/ssh-keys-import: fix error condition 2025-05-08 10:36:20 +02:00
Christian Hesse
5a7a200898 mod/ssh-keys-import: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
ef6fcb0c78 mod/scriptrunonce: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
2a77a50340 mode-button: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
6b20f0e42f mod/notification-gotify: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
9930b3a040 mod/notification-matrix: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
efe17a7e49 mod/notification-ntfy: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:36:20 +02:00
Christian Hesse
df58612ea4 mod/notification-telegram: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
b6e3ae24ea lease-script: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
9bf50d6853 gps-track: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
2ef0827561 global-functions: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
54bf9b0fe0 global-functions: $ValidateSyntax: add debug output 2025-05-08 10:31:34 +02:00
Christian Hesse
70fb34775f global-functions: $ValidateSyntax: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
d6767f092e global-functions: $ScriptInstallUpdate: :do ... on-error=... -> :onerror ... do=... 2025-05-08 10:31:34 +02:00
Christian Hesse
5d7c94cdaf sms-forward: add error handling on message removal 2025-05-08 09:51:08 +02:00
Christian Hesse
1940564016 global-functions: $RmFile: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
a11421860b 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-08 09:51:08 +02:00
Christian Hesse
9e2dbcd94f global-functions: $RmDir: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
4d3703de38 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-08 09:51:08 +02:00
Christian Hesse
4084d75f31 global-functions: $MkDir: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
c25f14eaa4 global-config: add another visual hint 2025-05-08 09:51:08 +02:00
Christian Hesse
9ef6cb10c2 global-functions: $GetMacVendor: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
006288108c global-config: add another comment with visual hint 2025-05-08 09:51:08 +02:00
Christian Hesse
e0d1ebcc65 global-functions: $FetchHuge: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
8787b5ddb6 global-functions: $DownloadPackage: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
84474d8910 global-config: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
98bb07242e fw-addr-lists: adopt changes in wording 2025-05-08 09:51:08 +02:00
Christian Hesse
7b463dde8a fw-addr-lists: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
28e1bffea2 check-routeros-update: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
78800753bb check-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
79db43d4b1 check-health: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
1ec25acd48 backup-upload: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
Christian Hesse
ebe77be142 backup-partition: :do ... on-error=... -> :onerror ... do=... 2025-05-08 09:51:08 +02:00
3 changed files with 6 additions and 8 deletions

View file

@ -8,6 +8,7 @@
# Warning: Do *NOT* copy this line to overlay!
:global GlobalConfigReady false;
# || ... but
# \||/ start
# \/ here!
@ -270,11 +271,10 @@
"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,9 +107,7 @@
:local ThreadId [ $IfThenElse ($Message->"is_topic_message") ($Message->"message_thread_id") "" ];
:foreach IdsTrusted in=($TelegramChatId, $TelegramChatIdsTrusted) do={
:if ($From->"id" = $IdsTrusted || \
$From->"username" = $IdsTrusted || \
$Chat->"id" = $IdsTrusted) do={
:if ($From->"id" = $IdsTrusted || $From->"username" = $IdsTrusted) do={
:set Trusted true;
}
}