Compare commits

..

97 commits

Author SHA1 Message Date
Christian Hesse
75b7252c11 Merge branch 'dhcp-to-dns' into next 2026-05-19 15:21:37 +02:00
Christian Hesse
c2538fb7a6 bump required RouterOS version for all scripts 2026-05-19 15:21:37 +02:00
Christian Hesse
63f394c3e8 dhcp-to-dns: allow to ignore for specific lease 2026-05-19 15:21:37 +02:00
Christian Hesse
fd96f8bbc3 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-05-19 15:21:37 +02:00
Christian Hesse
094683e104 update list of contributors 2026-05-19 15:21:37 +02:00
Christian Hesse
49dd935e03 Merge branch 'break-in-loop' into next 2026-05-19 15:21:37 +02:00
Łukasz Witkowski
62b48e3002 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.
2026-05-19 15:21:37 +02:00
Christian Hesse
e6ac506129 Merge branch 'continue-in-loop' into next 2026-05-19 15:21:37 +02:00
Christian Hesse
b2086fe336 telegram-chat: fix indention 2026-05-19 15:21:37 +02:00
Łukasz Witkowski
315826db13 dhcp-to-dns: set $LeaseInfo 2026-05-19 15:21:37 +02:00
Christian Hesse
9f041b09ff Merge branch 'early-exit-with-exit' into next 2026-05-19 15:21:37 +02:00
Christian Hesse
4c4db2f234 dhcp-to-dns: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
fb4bb23204 telegram-chat: use :break in loop 2026-05-19 15:21:37 +02:00
Łukasz Witkowski
43ab7e5f5f dhcp-to-dns: convert DNS names to lower case 2026-05-19 15:21:37 +02:00
Christian Hesse
368449178a Merge branch 'compare-ids' into next 2026-05-19 15:21:37 +02:00
Christian Hesse
ff7cc16dca global-functions: deprecate $ExitError 2026-05-19 15:21:37 +02:00
Christian Hesse
645a343970 dhcp-to-dns: use another :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
cb3ebc122f check-certificates: use :break in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
2357768a31 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-05-19 15:21:37 +02:00
Christian Hesse
64488eb014 Merge branch 'html-class-shadow' into next 2026-05-19 15:21:37 +02:00
Christian Hesse
b71c87a1f9 global-functions: deprecate $HexToNum 2026-05-19 15:21:37 +02:00
Christian Hesse
957a5121e4 update-tunnelbroker: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
4ec8a097b3 dhcp-to-dns: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
0fe17de762 contrib/logo-color: add class (and shadow) for screenshots 2026-05-19 15:21:37 +02:00
Christian Hesse
624c2bc9b3 log-forward: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
2c626d8ab6 update-gre-address: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
ac5db7dc71 telegram-chat: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
b6f28bb5ec contrib/html: support any class name from image alt text 2026-05-19 15:21:37 +02:00
Christian Hesse
c43a5df335 log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.

Initializing $LogForwardLast with boolean value looks odd, but this is
required to match the very first message.
2026-05-19 15:21:37 +02:00
Christian Hesse
2e2e4f4130 telegram-chat: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
970b6d9648 netwatch-dns: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
6910388bd0 general/style: add shadow for code blocks 2026-05-19 15:21:37 +02:00
Christian Hesse
586e10c407 sms-forward: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
8a16568f58 netwatch-dns: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
d7e9e84811 contrib/html: add class and shadow for screenshots 2026-05-19 15:21:37 +02:00
Christian Hesse
0e5cae02ff sms-action: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
6d1d82bc14 netwatch-dns: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
ecefdc94b4 contrib/html: add a class and shadow for notifications 2026-05-19 15:21:37 +02:00
Christian Hesse
4ef067fd19 ppp-on-up: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
260199aada netwatch-dns: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
2fc74b8ad7 doc/telegram-chat: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
e0cb1622ca packages-update: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
94ae6b5cfe global-functions: $ScriptInstallUpdate: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
bbe42fbd8f doc/sms-forward: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
2af110300a ospf-to-leds: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
6c12552276 global-functions: $ScriptInstallUpdate: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
d407c17a47 doc/netwatch-notify: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
7b18953cf8 netwatch-notify: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
434c523f85 global-functions: $CleanName: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
759ac0f725 doc/mod/scriptrunonce: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
c0a952c2b0 netwatch-dns: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
ec2c2e20bf fw-addr-lists: fix indention 2026-05-19 15:21:37 +02:00
Christian Hesse
04e0a73f6a doc/mod/notification-telegram: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
93055d40eb log-forward: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
8d150e3864 fw-addr-lists: use :continue in loop 2026-05-19 15:21:37 +02:00
Christian Hesse
6fe9f90575 doc/mod/notification-matrix: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
1dbdca15ca ipv6-update: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
4527681fa8 doc/mod/notification-gotify: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
7b610bd48d ipsec-to-dns: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
0d35c825a0 doc/mod/ipcalc: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
89eaaf3fea hotspot-to-wpa-cleanup: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
488cb3cf90 doc/mod/inspectvar: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
f58d503a40 hotspot-to-wpa: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
a792ed0c52 doc/log-forward: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
e08b6d80a3 gps-track: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
c4de33e064 doc/daily-psk: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
8a1dc2205e fw-addr-lists: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
84832aed73 doc/collect-wireless-mac: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
c9dead9e0f firmware-upgrade-reboot: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
6d5ee0c792 doc/check-routeros-update: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
ba06ed446c dhcpv6-client-lease: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
4c5be0c7be doc/check-perpetual-license: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
072afadb80 dhcpv4-server-lease: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
edcafc8fc0 doc/check-lte-firmware-upgrade: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
38a8d5caef dhcp-to-dns: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
b79d559ca8 doc/check-health: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
d44f649a1b dhcp-lease-comment: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
442b9f1171 doc/check-certificates: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
95e2fc05b8 daily-psk: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
7f5b053b4d doc/backup-upload: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
5e5f5a38bf collect-wireless-mac: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
da8f3abfc8 doc/backup-cloud: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
cb76d16317 check-routeros-update: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
813db8aad1 README: start image alt text with 'notification:' or 'screenshot:' 2026-05-19 15:21:37 +02:00
Christian Hesse
e210b1e215 check-perpetual-license: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
7149d79980 check-lte-firmware-upgrade: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
665ae36b23 check-health: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
500cfdba3e check-certificates: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
08a6725fcb certificate-renew-issued: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
00d262b630 capsman-rolling-upgrade: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
19f8e7e400 capsman-download-packages: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
9c95587e55 backup-upload: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
ceb06fd9ea backup-partition: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
2b947691bd backup-email: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
cb58973796 backup-cloud: early exit with :exit 2026-05-19 15:21:37 +02:00
Christian Hesse
0eca62bab8 contrib/html: give the head table a class 2026-05-19 15:21:36 +02:00
Christian Hesse
861c6db278 contrib/html: enclose content in span tag with class 2026-05-19 15:21:36 +02:00
11 changed files with 51 additions and 42 deletions

View file

@ -29,6 +29,7 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitFullyConnected;
:local CheckCertificatesDownloadImport do={
@ -44,10 +45,11 @@
:global FetchUserAgentStr;
:global LogPrint;
:global RmFile;
:global UrlEncode;
:global WaitForFile;
:foreach Type in={ "p12"; "pem" } do={
:local CertFileName ([ :convert to=url $FetchName ] . "." . $Type);
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
"' (file '" . $CertFileName . "')...");
@ -198,7 +200,7 @@
} else={
$LogPrint debug $ScriptName ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.");
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ :convert to=url $FetchName ] ] . "\\.(p12|pem)_[0-9]+\$") \
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $FetchName ] ] . "\\.(p12|pem)_[0-9]+\$") \
(common-name=($CertVal->"common-name") or subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $LastName ] . "(\\W|\$)")) \
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] ];
:local CertNewVal [ /certificate/get $CertNew ];

View file

@ -26,6 +26,7 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -75,7 +76,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -26,6 +26,7 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -74,7 +75,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -27,6 +27,7 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -90,7 +91,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -26,6 +26,7 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -75,7 +76,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -43,10 +43,10 @@ hr {
clear: both;
}
img.notification {
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
box-shadow: 5px 5px 7px gray;
}
img.screenshot {
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
box-shadow: 5px 5px 7px gray;
}
img.logo {
float: left;
@ -72,7 +72,7 @@ pre {
pre.code {
background-color: #f8f8f8;
border: 1px solid #ccc;
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
box-shadow: 5px 5px 7px gray;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;

View file

@ -10,7 +10,6 @@
:global ExitError;
:global HexToNum;
:global UrlEncode;
# wrapper for $ExitOnError with additional parameter
:set ExitError do={
@ -37,30 +36,3 @@
:return [ :tonum ("0x" . $Input) ];
}
# url encoding
:set UrlEncode do={
:local Input [ :tostr $1 ];
:if ([ :len $Input ] = 0) do={
:return "";
}
:local Return "";
:local Chars ("\n\r !\"#\$%&'()*+,:;<=>?@[\\]^`{|}~");
:local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F";
"%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" };
:for I from=0 to=([ :len $Input ] - 1) do={
:local Char [ :pick $Input $I ];
:local Replace [ :find $Chars $Char ];
:if ([ :typeof $Replace ] = "num") do={
:set Char ($Subs->$Replace);
}
:set Return ($Return . $Char);
}
:return $Return;
}

View file

@ -80,6 +80,7 @@
:global SymbolByUnicodeName;
:global SymbolForNotification;
:global Unix2Dos;
:global UrlEncode;
:global ValidateSyntax;
:global VersionToNum;
:global WaitDefaultRouteReachable;
@ -1736,6 +1737,33 @@
:return [ :tocrlf [ :tostr $1 ] ];
}
# url encoding
:set UrlEncode do={
:local Input [ :tostr $1 ];
:if ([ :len $Input ] = 0) do={
:return "";
}
:local Return "";
:local Chars ("\n\r !\"#\$%&'()*+,:;<=>?@[\\]^`{|}~");
:local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F";
"%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" };
:for I from=0 to=([ :len $Input ] - 1) do={
:local Char [ :pick $Input $I ];
:local Replace [ :find $Chars $Char ];
:if ([ :typeof $Replace ] = "num") do={
:set Char ($Subs->$Replace);
}
:set Return ($Return . $Char);
}
:return $Return;
}
# basic syntax validation
:set ValidateSyntax do={
:local Code [ :tostr $1 ];

View file

@ -242,6 +242,7 @@
:global FetchUserAgentStr;
:global LogPrint;
:global UrlEncode;
:global MatrixAccessToken;
:global MatrixHomeServer;
@ -250,8 +251,8 @@
:onerror Err {
/tool/fetch check-certificate=yes-without-crl output=none \
http-header-field=({ [ $FetchUserAgentStr $0 ] }) http-method=post http-data="" \
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ :convert to=url $MatrixRoom ] . \
"/join?access_token=" . [ :convert to=url $MatrixAccessToken ]) as-value;
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ $UrlEncode $MatrixRoom ] . \
"/join?access_token=" . [ $UrlEncode $MatrixAccessToken ]) as-value;
$LogPrint debug $0 ("Joined the room.");
} do={
$LogPrint error $0 ("Failed joining the room: " . $Err);

View file

@ -80,6 +80,7 @@
:global IfThenElse;
:global LogPrint;
:global SymbolForNotification;
:global UrlEncode;
:local Server [ $EitherOr ($NtfyServerOverride->($Notification->"origin")) $NtfyServer ];
:local User [ $EitherOr ($NtfyServerUserOverride->($Notification->"origin")) $NtfyServerUser ];
@ -91,7 +92,7 @@
:return false;
}
:local Url ("https://" . $Server . "/" . [ :convert to=url $Topic ]);
:local Url ("https://" . $Server . "/" . [ $UrlEncode $Topic ]);
:local Headers ({ [ $FetchUserAgentStr ($Notification->"origin") ]; \
("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \
("Title: " . "[" . $IdentityExtra . $Identity . "] " . ($Notification->"subject")) });

View file

@ -126,6 +126,7 @@
:global LogPrint;
:global ProtocolStrip;
:global SymbolForNotification;
:global UrlEncode;
:local EscapeMD do={
:local Text [ :tostr $1 ];
@ -202,7 +203,7 @@
}
:local Data ([ /tool/fetch check-certificate=yes-without-crl output=user http-method=post \
("https://api.telegram.org/bot" . $TokenId . "/sendMessage") \
http-data=($HTTPData . "&text=" . [ :convert to=url $Text ]) as-value ]->"data");
http-data=($HTTPData . "&text=" . [ $UrlEncode $Text ]) as-value ]->"data");
:set ($TelegramMessageIDs->[ :tostr ([ :deserialize from=json value=$Data ]->"result"->"message_id") ]) 1;
} do={
$LogPrint info $0 ("Failed sending Telegram notification: " . $Err . " - Queuing...");
@ -214,7 +215,7 @@
[ $EscapeMD ("This message was queued since _" . [ /system/clock/get date ] . \
" " . [ /system/clock/get time ] . "_ and may be obsolete.") "plain" "_" ]);
:set ($TelegramQueue->[ :len $TelegramQueue ]) { tokenid=$TokenId;
http-data=($HTTPData . "&text=" . [ :convert to=url $Text ]) };
http-data=($HTTPData . "&text=" . [ $UrlEncode $Text ]) };
:if ([ :len [ /system/scheduler/find where name="_FlushTelegramQueue" ] ] = 0) do={
/system/scheduler/add name="_FlushTelegramQueue" interval=1m start-time=startup \
on-event=(":global FlushTelegramQueue; \$FlushTelegramQueue;");