From f4a6d610ac50472e0381b8ec23f71172fe366e68 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 17 Sep 2020 14:23:45 +0100 Subject: [PATCH] tabs --- lgsm/functions/alert_ifttt.sh | 14 ++-- lgsm/functions/alert_pushbullet.sh | 16 ++--- lgsm/functions/alert_rocketchat.sh | 64 ++++++++--------- lgsm/functions/alert_slack.sh | 108 ++++++++++++++--------------- lgsm/functions/alert_telegram.sh | 16 ++--- 5 files changed, 109 insertions(+), 109 deletions(-) diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh index ceb494f67..facf90c77 100755 --- a/lgsm/functions/alert_ifttt.sh +++ b/lgsm/functions/alert_ifttt.sh @@ -8,9 +8,9 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$(cat < /dev/null; then - fn_print_fail_nl "Sending Rocketchat alert: jq is missing." - fn_script_log_fatal "Sending Rocketchat alert: jq is missing." + fn_print_fail_nl "Sending Rocketchat alert: jq is missing." + fn_script_log_fatal "Sending Rocketchat alert: jq is missing." fi json=$(cat < /dev/null; then - fn_print_fail_nl "Sending Slack alert: jq is missing." - fn_script_log_fatal "Sending Slack alert: jq is missing." + fn_print_fail_nl "Sending Slack alert: jq is missing." + fn_script_log_fatal "Sending Slack alert: jq is missing." fi json=$(cat <${alertemoji} ${alertsubject} ${alertemoji}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer name\n${servername}\n\nHostname\n${HOSTNAME}\n\nServer IP\n${alertip}:${port}\n\nMore info\n${alerturl}", - "disable_web_page_preview": "yes", + "chat_id": "${telegramchatid}", + "parse_mode": "HTML", + "text": "${alertemoji} ${alertsubject} ${alertemoji}\n\nMessage\n${alertbody}\n\nGame\n${gamename}\n\nServer name\n${servername}\n\nHostname\n${HOSTNAME}\n\nServer IP\n${alertip}:${port}\n\nMore info\n${alerturl}", + "disable_web_page_preview": "yes", EOF ) @@ -19,9 +19,9 @@ fn_print_dots "Sending Telegram alert" telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep "error_code") if [ "${telegramsend}" ]; then - fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" - fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" + fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" + fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" else - fn_print_ok_nl "Sending Telegram alert" - fn_script_log_pass "Sent Telegram alert" + fn_print_ok_nl "Sending Telegram alert" + fn_script_log_pass "Sent Telegram alert" fi