load dot conf file from home folder also

fix help
This commit is contained in:
Aleksandr Pletnev 2020-06-22 09:27:17 +02:00
parent e6a8f2cf2d
commit fde0c26732
1 changed files with 4 additions and 2 deletions

View File

@ -57,8 +57,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
@ -253,6 +254,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)