Skip to content

Commit

Permalink
chore: fix calling Docker entrypoint with arguments (#17163)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuss authored Nov 10, 2024
1 parent 32332fe commit 0071550
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packaging/docker/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ HASSIO_OPTIONSFILE=/data/options.json
if [ -f ${HASSIO_OPTIONSFILE} ]; then
CONFIG=$(grep -o '"config_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
echo "Using config file: ${CONFIG}"

SQLITE_FILE=$(grep -o '"sqlite_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')

if [ ! -f "${CONFIG}" ]; then
echo "Config not found. Please create a config under ${CONFIG}."
echo "For details see evcc documentation at https://github.com/evcc-io/evcc#readme."
Expand All @@ -23,7 +23,10 @@ if [ -f ${HASSIO_OPTIONSFILE} ]; then
fi
fi
else
if [ "$1" = '"evcc"' ] || expr "$1" : '-*' > /dev/null; then
if [ "$1" = 'evcc' ]; then
shift
exec evcc "$@"
elif expr "$1" : '-.*' > /dev/null; then
exec evcc "$@"
else
exec "$@"
Expand Down

0 comments on commit 0071550

Please sign in to comment.