This commit is contained in:
Fabian Schlenz 2020-11-25 18:12:52 +01:00
commit 66212fcc5a
1 changed files with 4 additions and 2 deletions

View File

@ -58,8 +58,9 @@ function help {
echo " TOKEN and CHAT_ID are required. You can set them in four different ways:"
echo " 1) globally in /etc/telegram.sh.conf"
echo " 2) user-local in ~/.telegram.sh"
echo " 3) via environment variables TELEGRAM_TOKEN and TELEGRAM_CHAT"
echo " 4) via options -t and -c"
echo " 3) user-local in ~/.telegram.sh.conf"
echo " 4) via environment variables TELEGRAM_TOKEN and TELEGRAM_CHAT"
echo " 5) via options -t and -c"
echo " Later methods overwrite earlier settings, so you can easily override global settings."
echo " Please be aware that you shuld keep your telegram token secret!"
echo
@ -275,6 +276,7 @@ log "Importing config file(s)..."
[ -r /etc/telegram.sh.conf ] && source /etc/telegram.sh.conf
[ -r ~/.telegram.sh ] && source ~/.telegram.sh
[ -r ~/.telegram.sh.conf ] && source ~/.telegram.sh.conf
[ -z "$TOKEN" ] && TOKEN=$TELEGRAM_TOKEN
[ ${#CHATS[@]} -eq 0 ] && CHATS=($TELEGRAM_CHAT)