From 3264fd94de4e2402bb7178e613f033b459263ffe Mon Sep 17 00:00:00 2001 From: Robi Meier Date: Sat, 16 Mar 2024 02:36:30 +0100 Subject: [PATCH] Change hostname to short format in telegeam notifcation title --- telegram_notification.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_notification.sh b/telegram_notification.sh index b7b100a..9130181 100755 --- a/telegram_notification.sh +++ b/telegram_notification.sh @@ -42,7 +42,7 @@ fi TG_MESSAGE=${MESSAGE//$'\n'/\%0A} # Send telegram to chat -resp=$(curl -s -f -X POST ${BOT_API_URL}/sendMessage -d chat_id=$CHAT_ID -d text="⚠️ *$(hostname | tr . ' ')* ⚠️%0A\`\`\`%0A${TG_MESSAGE}%0A\`\`\`" -d parse_mode=markdown) +resp=$(curl -s -f -X POST ${BOT_API_URL}/sendMessage -d chat_id=$CHAT_ID -d text="⚠️ *$(hostname -s | tr . ' ')* ⚠️%0A\`\`\`%0A${TG_MESSAGE}%0A\`\`\`" -d parse_mode=markdown) # Check if request succeeded if [[ $? -ne 0 ]]; then