Change hostname to short format in telegeam notifcation title
This commit is contained in:
parent
9fcfbb09af
commit
3264fd94de
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue