Home Assistant: fix crash if SEMP_BASE_URL is not set in config (#24906)
This commit is contained in:
parent
d476ba0137
commit
b828eebc2d
1 changed files with 4 additions and 1 deletions
|
|
@ -7,7 +7,10 @@ HASSIO_OPTIONSFILE=/data/options.json
|
|||
if [ -f ${HASSIO_OPTIONSFILE} ]; then
|
||||
CONFIG=$(grep -o '"config_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
|
||||
SQLITE_FILE=$(grep -o '"sqlite_file": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
|
||||
SEMP_BASE_URL=$(grep -o '"SEMP_BASE_URL": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
|
||||
SEMP_BASE_URL=""
|
||||
if grep -q '"SEMP_BASE_URL":' ${HASSIO_OPTIONSFILE}; then
|
||||
SEMP_BASE_URL=$(grep -o '"SEMP_BASE_URL": "[^"]*' ${HASSIO_OPTIONSFILE} | grep -o '[^"]*$')
|
||||
fi
|
||||
|
||||
# Config File Migration
|
||||
# If there is no config file found in '/config' we copy it from '/homeassistant' and rename the old config file to .migrated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue