Alexandre
2024-09-22 18:00:26 +02:00
parent 6bfc9585fc
commit b8e2307df4
3 changed files with 20 additions and 17 deletions

View File

@@ -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.

View File

@@ -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]"
}

View File

@@ -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