mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $SendTelegram: check status of certificate download
This commit is contained in:
parent
e963e09114
commit
324f5b0ba4
1 changed files with 5 additions and 2 deletions
|
@ -596,8 +596,9 @@
|
||||||
:global TelegramChatId;
|
:global TelegramChatId;
|
||||||
:global TelegramChatIdOverride;
|
:global TelegramChatIdOverride;
|
||||||
|
|
||||||
:global UrlEncode;
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
|
:global LogPrintExit;
|
||||||
|
:global UrlEncode;
|
||||||
|
|
||||||
:local ChatId $TelegramChatId;
|
:local ChatId $TelegramChatId;
|
||||||
:if ([ :len $TelegramChatIdOverride ] > 0) do={
|
:if ([ :len $TelegramChatIdOverride ] > 0) do={
|
||||||
|
@ -608,8 +609,10 @@
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$CertificateAvailable "Go Daddy Secure Certificate Authority - G2";
|
|
||||||
:do {
|
:do {
|
||||||
|
:if ([ $CertificateAvailable "Go Daddy Secure Certificate Authority - G2" ] = false) do={
|
||||||
|
$LogPrintExit warning ("Downloading required certificate failed.") true;
|
||||||
|
}
|
||||||
/ tool fetch check-certificate=yes-without-crl output=none http-method=post \
|
/ tool fetch check-certificate=yes-without-crl output=none http-method=post \
|
||||||
("https://api.telegram.org/bot" . $TelegramTokenId . "/sendMessage") \
|
("https://api.telegram.org/bot" . $TelegramTokenId . "/sendMessage") \
|
||||||
http-data=("chat_id=" . $ChatId . "&disable_notification=" . $Silent . \
|
http-data=("chat_id=" . $ChatId . "&disable_notification=" . $Silent . \
|
||||||
|
|
Loading…
Reference in a new issue