Skip to content

Commit 0071550

Browse files
authored
chore: fix calling Docker entrypoint with arguments (#17163)
1 parent 32332fe commit 0071550

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packaging/docker/bin/entrypoint.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ HASSIO_OPTIONSFILE=/data/options.json
77
if [ -f ${HASSIO_OPTIONSFILE} ]; then
88
CONFIG=$(grep -o '"config_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
99
echo "Using config file: ${CONFIG}"
10-
10+
1111
SQLITE_FILE=$(grep -o '"sqlite_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
12-
12+
1313
if [ ! -f "${CONFIG}" ]; then
1414
echo "Config not found. Please create a config under ${CONFIG}."
1515
echo "For details see evcc documentation at https://github.com/evcc-io/evcc#readme."
@@ -23,7 +23,10 @@ if [ -f ${HASSIO_OPTIONSFILE} ]; then
2323
fi
2424
fi
2525
else
26-
if [ "$1" = '"evcc"' ] || expr "$1" : '-*' > /dev/null; then
26+
if [ "$1" = 'evcc' ]; then
27+
shift
28+
exec evcc "$@"
29+
elif expr "$1" : '-.*' > /dev/null; then
2730
exec evcc "$@"
2831
else
2932
exec "$@"

0 commit comments

Comments
 (0)