chore: fix calling Docker entrypoint with arguments (#17163)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
Roland Huß 2024-11-10 10:57:33 +01:00 • committed by GitHub
parent 32332fe8a2
commit 00715500a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 "$@"