From 0a05e5b37d30474fc410779607d2cd0c1b8888bd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:07:49 +0100 Subject: [PATCH] Update 20-folders.sh --- postgres/rootfs/etc/cont-init.d/20-folders.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postgres/rootfs/etc/cont-init.d/20-folders.sh b/postgres/rootfs/etc/cont-init.d/20-folders.sh index 542dec596..adfdabf51 100755 --- a/postgres/rootfs/etc/cont-init.d/20-folders.sh +++ b/postgres/rootfs/etc/cont-init.d/20-folders.sh @@ -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