From 00715500a55129d4a5df56b5e39d167e9862d518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Sun, 10 Nov 2024 10:57:33 +0100 Subject: [PATCH] chore: fix calling Docker entrypoint with arguments (#17163) --- packaging/docker/bin/entrypoint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packaging/docker/bin/entrypoint.sh b/packaging/docker/bin/entrypoint.sh index ed4228b66..1fea90c3e 100755 --- a/packaging/docker/bin/entrypoint.sh +++ b/packaging/docker/bin/entrypoint.sh @@ -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." @@ -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 "$@"