This commit is contained in:
Alexandre
2025-02-06 11:00:14 +01:00
committed by GitHub
parent eefc48bfef
commit 3afa5ed977

View File

@@ -14,14 +14,14 @@ CONFIGSOURCE="$(bashio::config "CONFIG_LOCATION")"
if [ -d "/homeassistant/addons_config/$slug" ] && [ ! -f "/homeassistant/addons_config/$slug/migrated" ]; then if [ -d "/homeassistant/addons_config/$slug" ] && [ ! -f "/homeassistant/addons_config/$slug/migrated" ]; then
echo "Migrating /homeassistant/addons_config/$slug" echo "Migrating /homeassistant/addons_config/$slug"
sudo mv /homeassistant/addons_config/"$slug"/* "$CONFIGSOURCE"/ mv /homeassistant/addons_config/"$slug"/* "$CONFIGSOURCE"/
sudo touch /homeassistant/addons_config/$slug/migrated touch /homeassistant/addons_config/$slug/migrated
fi fi
# Create directory # Create directory
sudo mkdir -p "$CONFIGSOURCE"/import_files mkdir -p "$CONFIGSOURCE"/import_files
sudo mkdir -p "$CONFIGSOURCE"/configurations mkdir -p "$CONFIGSOURCE"/configurations
# Make sure permissions are right # Make sure permissions are right
sudo chown -R "www-data:www-data" "$CONFIGSOURCE" chown -R "www-data:www-data" "$CONFIGSOURCE"
sudo chmod -R 755 "$CONFIGSOURCE" chmod -R 755 "$CONFIGSOURCE"