Update 01-migrate.sh

This commit is contained in:
Alexandre authored and GitHub committed 2025-02-21 09:22:30 +01:00
1 parent 14ac05bba3
commit 83fea15094
1 file changed
+1 -1
@@ -9,7 +9,7 @@ if [[ "$LOCATION" == "/config/addons_config/"* ]]; then
bashio::log.warning "Data folder was $LOCATION, it is migrated to /config/data. The previous folder is renamed to _migrated" bashio::log.warning "Data folder was $LOCATION, it is migrated to /config/data. The previous folder is renamed to _migrated"
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 -rf "$LOCATION"/* /config/data/
mv "$LOCATION" "$LOCATION"_migrated mv "$LOCATION" "$LOCATION"_migrated
fi fi