mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 12:54:04 +02:00
Update logic
This commit is contained in:
@@ -14,15 +14,15 @@ fi
|
|||||||
|
|
||||||
# Define slug
|
# Define slug
|
||||||
slug="${HOSTNAME/-/_}"
|
slug="${HOSTNAME/-/_}"
|
||||||
|
slug="${slug#*_}"
|
||||||
|
|
||||||
# Check type of config folder
|
# Check type of config folder
|
||||||
if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then
|
if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then
|
||||||
# New config location
|
# New config location
|
||||||
CONFIGLOCATION="/config"
|
CONFIGLOCATION="/config"
|
||||||
CONFIGFILEBROWSER="/addon_configs/$slug/config.yaml"
|
CONFIGFILEBROWSER="/addon_configs/${HOSTNAME/-/_}/config.yaml"
|
||||||
else
|
else
|
||||||
# Legacy config location
|
# Legacy config location
|
||||||
slug="${slug#*_}"
|
|
||||||
CONFIGLOCATION="/config/addons_config/${slug}"
|
CONFIGLOCATION="/config/addons_config/${slug}"
|
||||||
CONFIGFILEBROWSER="/homeassistant/addons_config/$slug/config.yaml"
|
CONFIGFILEBROWSER="/homeassistant/addons_config/$slug/config.yaml"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user