mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 07:35:56 +02:00
Ensure _
https://github.com/alexbelgium/hassio-addons/issues/1558#issuecomment-2402457871
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user