chore: prune folder structure
This commit is contained in:
parent
383f337d6e
commit
384cedae00
5 changed files with 3 additions and 3 deletions
0
packaging/docker/bin/docker-btmgmt
Normal file
0
packaging/docker/bin/docker-btmgmt
Normal file
31
packaging/docker/bin/entrypoint.sh
Executable file
31
packaging/docker/bin/entrypoint.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# started as hassio addon
|
||||
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."
|
||||
else
|
||||
if [ "${SQLITE_FILE}" ]; then
|
||||
echo "starting evcc: 'EVCC_DATABASE_DSN=${SQLITE_FILE} evcc --config ${CONFIG}'"
|
||||
exec env EVCC_DATABASE_DSN="${SQLITE_FILE}" evcc --config "${CONFIG}"
|
||||
else
|
||||
echo "starting evcc: 'evcc --config ${CONFIG}'"
|
||||
exec evcc --config "${CONFIG}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ "$1" == '"evcc"' ] || expr "$1" : '-*' > /dev/null; then
|
||||
exec evcc "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue