Alexandre
2024-10-10 20:13:15 +02:00
committed by GitHub
parent 35a4ccad91
commit 7ac13b73f6

View File

@@ -12,16 +12,16 @@ if [ ! -d /config ]; then
fi fi
# Define slug # Define slug
slug="${HOSTNAME}" slug="${HOSTNAME//-/_}"
# 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/${HOSTNAME#*-}.sh" CONFIGFILEBROWSER="/addon_configs/$slug/${HOSTNAME#*_}.sh"
else else
# Legacy config location # Legacy config location
slug="${HOSTNAME#*-}" slug="${HOSTNAME#*_}"
CONFIGLOCATION="/config/addons_autoscripts" CONFIGLOCATION="/config/addons_autoscripts"
CONFIGFILEBROWSER="/homeassistant/addons_autoscripts/${slug}.sh" CONFIGFILEBROWSER="/homeassistant/addons_autoscripts/${slug}.sh"
fi fi