mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 09:05:55 +02:00
Improve folder recognition
https://github.com/alexbelgium/hassio-addons/issues/1784#issuecomment-2687043200
This commit is contained in:
@@ -26,12 +26,21 @@ if [[ "$LOCATION" == "/config/addons_config/"* ]]; then
|
|||||||
LOCATION="${LOCATION/config/homeassistant}"
|
LOCATION="${LOCATION/config/homeassistant}"
|
||||||
mkdir -p /config/data
|
mkdir -p /config/data
|
||||||
if [ -d "$LOCATION" ]; then
|
if [ -d "$LOCATION" ]; then
|
||||||
cp -rf "$LOCATION"/* /config/data/
|
cp -rn "$LOCATION"/* /config/data/
|
||||||
mv "$LOCATION" "$LOCATION"_migrated
|
mv "$LOCATION" "$LOCATION"_migrated
|
||||||
fi
|
fi
|
||||||
bashio::addon.option "data_location" "/config/data"
|
bashio::addon.option "data_location" "/config/data"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d "/homeassistant/addons_config/jellyfin" ]]; then
|
||||||
|
bashio::log.warning "Data folder was found in /config/addons_config/jellyfin, it is migrated to /config/data. The previous folder is renamed to _migrated"
|
||||||
|
mkdir -p /config/data
|
||||||
|
cp -rn "/homeassistant/addons_config/jellyfin/*" /config/data/
|
||||||
|
mv /homeassistant/addons_config/jellyfin /homeassistant/addons_config/jellyfin_migrated
|
||||||
|
ln -sf /config/data /config/addons_config/jellyfin
|
||||||
|
bashio::addon.option "data_location" "/config/data"
|
||||||
|
fi
|
||||||
|
|
||||||
# Migrate autoscripts
|
# Migrate autoscripts
|
||||||
if [ -f "/homeassistant/addons_autoscripts/$slug.sh" ]; then
|
if [ -f "/homeassistant/addons_autoscripts/$slug.sh" ]; then
|
||||||
bashio::log.warning "Migrating autoscript"
|
bashio::log.warning "Migrating autoscript"
|
||||||
|
|||||||
Reference in New Issue
Block a user