Change hostname to short format in telegeam notifcation title

This commit is contained in:
Robin Meier 2024-03-16 02:36:30 +01:00
parent 9fcfbb09af
commit 3264fd94de
1 changed files with 1 additions and 1 deletions

View File

@ -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