From c1a739468d4d630251c6259b84266cb1fe7fe589 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Tue, 18 Feb 2025 14:45:55 -0600 Subject: [PATCH] Added logs for humans --- packaging/common/cfengine-hub/postinstall.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/common/cfengine-hub/postinstall.sh b/packaging/common/cfengine-hub/postinstall.sh index d0b11e19b..31e916da4 100644 --- a/packaging/common/cfengine-hub/postinstall.sh +++ b/packaging/common/cfengine-hub/postinstall.sh @@ -801,12 +801,17 @@ if [ ! -f $PREFIX/state/pg/data/postgresql.conf ]; then else pgconfig_type="PostgreSQL default" fi + cf_console echo "No existing postgresql.conf, initializing Postgres" init_postgres_dir "$new_pgconfig_file" "$pgconfig_type" fi if is_upgrade && [ -d "$BACKUP_DIR/data" ]; then + cf_console echo "Upgrade & BACKUP_DIR/data is present, proceeding with db migration" do_migration "$new_pgconfig_file" "$pgconfig_type" +else + cf_console echo "No db migration necessary, skipping" fi + (cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl -w -D $PREFIX/state/pg/data -l /var/log/postgresql.log start") #make sure that server is up and listening