Skip to content

Commit

Permalink
Visual aspect improvment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Vogelsinger authored and Stéphane VOGELSINGER committed Apr 29, 2022
1 parent bab3caf commit 3d151a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telegram-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ KEY=$(cat /etc/fail2ban/script.d/telegram.key)

function send {
URL="https://api.telegram.org/bot$KEY/sendMessage"
DATE=$(date +"%d/%m/%y %H%M")
DATE=$(date +"%d/%m/%y %H:%M")

SRV_HOSTNAME=$(hostname -f)
SRV_IP=$(hostname -I | awk '{print $1}')
TEXT="${DATE} - $SRV_HOSTNAME
TEXT="${DATE} - Host: $SRV_HOSTNAME
$1"

curl -s -d "chat_id=$ID&text=${TEXT}&disable_web_page_preview=true&parse_mode=markdown" $URL > /dev/null
Expand Down

0 comments on commit 3d151a8

Please sign in to comment.