mirror of
https://github.com/PaiGramTeam/telegram-bot-api-build.git
synced 2024-11-21 22:48:07 +00:00
feat: handling of http-port env values added to entry points
This commit is contained in:
parent
a3e3b4c0a2
commit
e19317eb44
@ -10,7 +10,7 @@ if [ -n "${1}" ]; then
|
||||
exec "${*}"
|
||||
fi
|
||||
|
||||
DEFAULT_ARGS="--http-port 8081 --dir=${TELEGRAM_WORK_DIR} --temp-dir=${TELEGRAM_TEMP_DIR} --username=${USERNAME} --groupname=${GROUPNAME}"
|
||||
DEFAULT_ARGS="--dir=${TELEGRAM_WORK_DIR} --temp-dir=${TELEGRAM_TEMP_DIR} --username=${USERNAME} --groupname=${GROUPNAME}"
|
||||
CUSTOM_ARGS=""
|
||||
|
||||
if [ -n "$TELEGRAM_LOG_FILE" ]; then
|
||||
@ -41,6 +41,13 @@ if [ -n "$TELEGRAM_HTTP_IP_ADDRESS" ]; then
|
||||
CUSTOM_ARGS="${CUSTOM_ARGS} --http-ip-address=$TELEGRAM_HTTP_IP_ADDRESS"
|
||||
fi
|
||||
|
||||
# Set http-port arg
|
||||
if [ -n "$TELEGRAM_HTTP_PORT" ]; then
|
||||
CUSTOM_ARGS="${CUSTOM_ARGS} --http-port=$TELEGRAM_HTTP_PORT"
|
||||
else
|
||||
CUSTOM_ARGS="${CUSTOM_ARGS} --http-port=8081"
|
||||
fi
|
||||
|
||||
COMMAND="telegram-bot-api ${DEFAULT_ARGS}${CUSTOM_ARGS}"
|
||||
|
||||
echo "$COMMAND"
|
||||
|
Loading…
Reference in New Issue
Block a user