mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01: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
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user