diff options
author | Christian Hesse <mail@eworm.de> | 2020-04-03 14:57:51 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-04-03 15:03:27 +0200 |
commit | 324f5b0ba428abf477f128577f2f6c3604a15ab5 (patch) | |
tree | 07b21fb8f1b94efce6342b30162824978bb92499 /global-functions | |
parent | e963e091148dd095cd9d1510eae0249849309e4e (diff) |
global-functions: $SendTelegram: check status of certificate download
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/global-functions b/global-functions index 05d98ed..29ce59d 100644 --- a/global-functions +++ b/global-functions @@ -596,8 +596,9 @@ :global TelegramChatId; :global TelegramChatIdOverride; - :global UrlEncode; :global CertificateAvailable; + :global LogPrintExit; + :global UrlEncode; :local ChatId $TelegramChatId; :if ([ :len $TelegramChatIdOverride ] > 0) do={ @@ -608,8 +609,10 @@ :return false; } - $CertificateAvailable "Go Daddy Secure Certificate Authority - G2"; :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 \ ("https://api.telegram.org/bot" . $TelegramTokenId . "/sendMessage") \ http-data=("chat_id=" . $ChatId . "&disable_notification=" . $Silent . \ |