chore: fix calling Docker entrypoint with arguments (#17163)
Some checks failed
Some checks failed
This commit is contained in:
parent
32332fe8a2
commit
00715500a5
1 changed files with 6 additions and 3 deletions
|
|
@ -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 "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue