This commit is contained in:
root
2018-09-19 08:32:47 +00:00
commit 33a79b7b31
5 changed files with 136 additions and 0 deletions

14
after.sh Executable file
View File

@@ -0,0 +1,14 @@
#! /bin/bash
##
## Send mail to admin
##
#mail -a "From: "$HOST" Backup <"$HOST"@server.de>" -s "Backup | "$HOST $MAIL < $LOG
if [ ${global_exit} -ne 0 ];
then
echo ${global_exit}
# curl -X POST 'https://api.telegram.org/bot$TELEGRAM_API_TOKEN/sendMessage?chat_id=$TELEGRAM_CHAT_ID&text="$(cat $LOG)"'
wget "https://api.telegram.org/bot$TELEGRAM_API_TOKEN/sendMessage" --post-data="chat_id=$TELEGRAM_CHAT_ID&text='$(cat $LOG)'"
fi