From 02d4e55323e73f05c89dbe4fd9395ed81fa98dd3 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 6 Dec 2024 14:17:36 +0100 Subject: [PATCH] Fix bad listen address --- migrate.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migrate.sh b/migrate.sh index 29e6a7e..9e94afd 100644 --- a/migrate.sh +++ b/migrate.sh @@ -23,8 +23,11 @@ mkdir "$NEW_DB_PATH" # Perform migration cd /tmp /postgres/17/bin/pg_upgrade -b /postgres/16/bin/ -d "$OLD_DB_PATH" -D "$NEW_DB_PATH" -U "$POSTGRES_USER" || exit 2 -cp "$OLD_DB_PATH/pg_hba.conf" "$NEW_DB_PATH/pg_hba.conf" +# Configure database server +echo Configure database server +cp "$OLD_DB_PATH/pg_hba.conf" "$NEW_DB_PATH/pg_hba.conf" +sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" "$NEW_DB_PATH/postgresql.conf" # Replace database echo "Replace database files..."