From 7ac13b73f6e56c8330e2d1c320a48de93edf587a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:13:15 +0200 Subject: [PATCH] Ensure _ https://github.com/alexbelgium/hassio-addons/issues/1558#issuecomment-2402457871 --- .templates/01-custom_script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.templates/01-custom_script.sh b/.templates/01-custom_script.sh index d5f97e6cd..570adb6c1 100755 --- a/.templates/01-custom_script.sh +++ b/.templates/01-custom_script.sh @@ -12,16 +12,16 @@ if [ ! -d /config ]; then fi # Define slug -slug="${HOSTNAME}" +slug="${HOSTNAME//-/_}" # Check type of config folder if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then # New config location CONFIGLOCATION="/config" - CONFIGFILEBROWSER="/addon_configs/$slug/${HOSTNAME#*-}.sh" + CONFIGFILEBROWSER="/addon_configs/$slug/${HOSTNAME#*_}.sh" else # Legacy config location - slug="${HOSTNAME#*-}" + slug="${HOSTNAME#*_}" CONFIGLOCATION="/config/addons_autoscripts" CONFIGFILEBROWSER="/homeassistant/addons_autoscripts/${slug}.sh" fi