From 1bb36a858ba6a3f3067e3487b3bbdedb4a25eab1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:13:52 +0200 Subject: [PATCH] Update logic --- .templates/01-config_yaml.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 1268b974f..a93600b66 100755 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -14,15 +14,15 @@ fi # Define slug slug="${HOSTNAME/-/_}" +slug="${slug#*_}" # Check type of config folder if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then # New config location CONFIGLOCATION="/config" - CONFIGFILEBROWSER="/addon_configs/$slug/config.yaml" + CONFIGFILEBROWSER="/addon_configs/${HOSTNAME/-/_}/config.yaml" else # Legacy config location - slug="${slug#*_}" CONFIGLOCATION="/config/addons_config/${slug}" CONFIGFILEBROWSER="/homeassistant/addons_config/$slug/config.yaml" fi