diff --git a/mealie/CHANGELOG.md b/mealie/CHANGELOG.md index c03a134d9..c5d314876 100644 --- a/mealie/CHANGELOG.md +++ b/mealie/CHANGELOG.md @@ -1,3 +1,5 @@ +- Another version with 1.12 to try to solve issues with config not recognized + ## v1.12.0-2 (25-08-2024) - BACKUP BEFORE UPDATING !!! - WARNING : version 1.12 erroneously updated to 2.0. Your database could become corrupted if you update from 1.12. You need to restore your homeassistant config directory before updating to this version Alas there is no easy solution to move back from Mealie 2.0 to 1.2. diff --git a/mealie/config.json b/mealie/config.json index 1f6da0744..a750f33e8 100644 --- a/mealie/config.json +++ b/mealie/config.json @@ -65,7 +65,7 @@ "/dev/nvme2" ], "environment": { - "DATA_DIR": "/config", + "DATA_DIR": "/config/addons_config/mealie_data", "DB_ENGINE": "sqlite", "MAX_WORKERS": "1", "WEB_CONCURRENCY": "2", @@ -81,7 +81,7 @@ "name": "Mealie", "options": { "ALLOW_SIGNUP": true, - "DATA_DIR": "/config", + "DATA_DIR": "/config/addons_config/mealie_data", "PGID": 1000, "PUID": 1000, "certfile": "fullchain.pem", @@ -109,6 +109,6 @@ "slug": "mealie", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "v1.12.0-2", + "version": "v1.12.0-3", "webui": "[PROTO:ssl]://[HOST]:[PORT:9001]" } diff --git a/mealie/rootfs/run.txt b/mealie/rootfs/run.txt index 4fcbb592b..44fb7e5b3 100644 --- a/mealie/rootfs/run.txt +++ b/mealie/rootfs/run.txt @@ -35,23 +35,23 @@ done # MIGRATE DATA DIR # #################### -if [ -d /homeassistant/addons_config/mealie_data ] && [ ! -f /homeassistant/addons_config/mealie_data/migrated ]; then - 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 -fi +#if [ -d /homeassistant/addons_config/mealie_data ] && [ ! -f /homeassistant/addons_config/mealie_data/migrated ]; then +# 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 +#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 -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 +#fi ############### # CONFIG YAML # ############### -CONFIGSOURCE="/config/config.yaml" +CONFIGSOURCE="/config/addons_config/mealie/config.yaml" if [ -f "$CONFIGSOURCE" ]; then bashio::log.info "config.yaml found in $CONFIGSOURCE, exporting variables" @@ -77,7 +77,8 @@ function parse_yaml { } # Get list of parameters in a file -parse_yaml "$CONFIGSOURCE" "" >/tmpfile +parse_yaml /tempenv "" >/tmpfile + while IFS= read -r line; do # Clean output line="${line//[\"\']/}" @@ -86,10 +87,10 @@ while IFS= read -r line; do echo "secret detected" secret=${line#*secret } # Check if single match - secretnum=$(sed -n "/$secret:/=" /homeassistant/secrets.yaml) + secretnum=$(sed -n "/$secret:/=" /config/secrets.yaml) [[ $(echo $secretnum) == *' '* ]] && bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file" # Get text - secret=$(sed -n "/$secret:/p" /homeassistant/secrets.yaml) + secret=$(sed -n "/$secret:/p" /config/secrets.yaml) secret=${secret#*: } line="${line%%=*}='$secret'" fi