10 lines
320 B
Bash
10 lines
320 B
Bash
#! /bin/sh
|
|
APIURL="$(cat /usr/local/bin/sendtelegram.config | grep "APIURL=" | cut -d= -f2)"
|
|
CHATID="$(cat /usr/local/bin/sendtelegram.config | grep "CHATID=" | cut -d= -f2)"
|
|
TXTMSG="[Authorization] $(cat /etc/hostname):
|
|
$(w -h)"
|
|
|
|
(
|
|
curl -s -X POST $APIURL -d chat_id=$CHATID -d text="$TXTMSG" >> /dev/null 2>&1 &
|
|
)
|