Update 20-folders.sh

This commit is contained in:
Alexandre
2024-01-31 09:07:49 +01:00
committed by GitHub
parent ddcddf9019
commit 0a05e5b37d

View File

@@ -2,6 +2,7 @@
# shellcheck shell=bash
set -e
# Migration
if [ -d /data/database ]; then
bashio::log.warning "Database migrated to /config"
mv /data/database /config
@@ -11,4 +12,6 @@ if [ -f /homeassistant/addons_config/postgres/config.yaml ]; then
bashio::log.warning "Config migrated to /config"
mv /homeassistant/addons_config/postgres/* /config/
rm -r /homeassistant/addons_config/postgres
# Correct database location
sed -i "s|/data/|/config/|g" /config/postgresql.conf
fi