I saw post from BaliMiner. Thanks for your post! I decided to split in with my email notification script.
But I decided ti use original telegram-notify tool.
fullzero, please update this too.
#!/bin/bash
MSM_NUM=$1
source ~/wallets
source ~/settings.sh
MSG=""
IMG=""
DOC=""
case $MSM_NUM in
0)
MSG="System was started"
IMG="--success"
;;
1)
MSG="GPU Miner was started"
IMG="--success"
;;
2)
MSG="CPU Miner was started"
IMG="--success"
;;
3)
MSG="GPU miner was crushed and restarting now"
IMG="--error"
DOC="--document "/home/m1/4_restartlog""
;;
4)
MSG="New setiings arrived. Restart now"
IMG="--question"
DOC="--document "/home/m1/wallets.diff""
;;
5)
MSG="Lost GPU so restarting system"
IMG="--error"
DOC="--document "/home/m1/4_restartlog""
;;
6)
MSG="Utilization is too low: so restarting system"
IMG="--error"
DOC="--document "/home/m1/4_restartlog""
;;
7)
MSG="NICEHASH was started just now!"
IMG="--success"
;;

IP=$(cat /home/m1/last_ip)
MSG="webUI was started just now http://$IP/"
IMG="--success"
;;
*)
TEMP=$(/usr/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv)
PD=$(/usr/bin/nvidia-smi --query-gpu=power.draw --format=csv)
FAN=$(/usr/bin/nvidia-smi --query-gpu=fan.speed --format=csv)
LF=$'\n'
PROFIT=$(cat /home/m1/current-profit)
MSG=$TEMP$LF$PD$LF$FAN
#MSG="$WORKER_NAME Error with subject!"
;;
esac
# telegram-notify --success --text "Action *sucessful* with markdown *bold* example"
# telegram-notify --error --title "Error" --text "Error message with a title"
# telegram-notify --question --title "File content display" --text "/tmp/log.txt"
# telegram-notify --icon 1F355 --text "Message with custom icon 1F355 and embedded image" --photo "/tmp/icon.png"
# telegram-notify --text "Result is available in the embedded document" --document "/tmp/result.log"
if [ $EMAIL == "YES" ]
then
sendemail -f $RIG_EMAIL -t $ADMIN_EMAIL -u $WORKER_NAME -m "$MSG" -s $RIG_SMTP -o tls=yes -xu $RIG_EMAIL -xp $RIG_EMAIL_PASS & > /dev/null 2>&1
fi
if [ $TELEGRAM == "YES" ]
then
MSG="
"$WORKER_NAME" - "$MSG
telegram-notify ${IMG} --text "${MSG}" ${DOC} --html > /dev/null 2>&1
fi
Maybe it is time to move with your code to github ? A lot of people what to make some fixes, addons and so on.