diff --git a/bin/bashbot_env.inc.sh b/bin/bashbot_env.inc.sh index d935e64..f7524ac 100644 --- a/bin/bashbot_env.inc.sh +++ b/bin/bashbot_env.inc.sh @@ -13,7 +13,7 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 18.12.2020 12:27 # -#### $$VERSION$$ v1.40-0-gf9dab50 +#### $$VERSION$$ v1.45-dev-50-g34923dd #=============================================================================== ############ @@ -21,8 +21,8 @@ export BASHBOT_HOME BASHBOT_ETC BASHBOT_VAR FILE_REGEX ME # default: one dir up -BASHBOT_HOME="$(cd "${BASH_SOURCE[0]%/*}" >/dev/null 2>&1 && pwd)/../" -[ "${BASHBOT_HOME}" = "/../" ] && BASHBOT_HOME="../" +BASHBOT_HOME="$(cd "${BASH_SOURCE[0]%/*}/../" >/dev/null 2>&1 && pwd)" +[ "${BASHBOT_HOME}" = "" ] && BASHBOT_HOME="../" # set you own BASHBOT_HOME if different, e.g. # BASHBOT_HOME="/usr/local/telegram-bot-bash" @@ -65,6 +65,10 @@ ME="${BOT_NAME}" [[ -z "${BOT_ADMIN}" || "${BOT_ADMIN}" == "?" ]] && printf "%s\n" "${ORANGE}Warning: Botadmin not set, send bot command${NC} /start" [[ -z "${BOT_NAME}" ]] && printf "%s\n" "${ORANGE}Warning: Botname not set, run bashbot.sh botname" +# default webhook pipe +export WEBHOOK="${DATADIR}/webhook-fifo-${ME}" + + # output command result or Telegram response print_result() { jssh_printDB "BOTSENT" | sort -r; } print_response() { jssh_printDB "UPD"; }