This commit is contained in:
Alexandre
2024-10-15 12:41:40 +02:00
parent 5b2a7175a3
commit 0bade03a4e
2 changed files with 8 additions and 1 deletions

View File

@@ -39,12 +39,19 @@ if [ -d /homeassistant/addons_config/mealie_data ] && [ ! -f /homeassistant/addo
bashio::log.warning "Migrating data, current data will not be touched"
cp -rnf /homeassistant/addons_config/mealie_data/* /config/ || true
touch /homeassistant/addons_config/mealie_data/migrated
bashio::addon.option "DATA_DIR" "/config"
fi
if [ -f /homeassistant/addons_config/mealie/config.yaml ] && [ ! -f /homeassistant/addons_config/mealie/migrated ]; then
bashio::log.warning "Migrating config.yaml, current data will not be touched"
cp -nf /homeassistant/addons_config/mealie/config.yaml /config/ || true
touch /homeassistant/addons_config/mealie/migrated
bashio::addon.option "DATA_DIR" "/config"
fi
if [[ "$(bashio::config "DATA_DIR")" == "/config/addons_config/mealie_data" ]]; then
bashio::addon.option "DATA_DIR" "/config"
bashio::addon.restart
fi
###############