|
@@ -8,7 +8,6 @@ local commandname="ALERT"
|
|
|
local commandaction="Alert"
|
|
local commandaction="Alert"
|
|
|
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
|
|
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
|
|
|
|
|
|
|
|
-
|
|
|
|
|
json=$(cat <<EOF
|
|
json=$(cat <<EOF
|
|
|
{
|
|
{
|
|
|
"chat_id": "${telegramchatid}",
|
|
"chat_id": "${telegramchatid}",
|
|
@@ -20,7 +19,7 @@ EOF
|
|
|
|
|
|
|
|
fn_print_dots "Sending Telegram alert"
|
|
fn_print_dots "Sending Telegram alert"
|
|
|
sleep 0.5
|
|
sleep 0.5
|
|
|
-telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep -Po '(?<="description":").*?(?=")'|uniq)
|
|
|
|
|
|
|
+telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage")
|
|
|
|
|
|
|
|
if [ -n "${telegramsend}" ]; then
|
|
if [ -n "${telegramsend}" ]; then
|
|
|
fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"
|
|
fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"
|