Skip to content

Commit 57b3f36

Browse files
authored
Merge pull request #1942 from nickanderson/logs-for-humans/3.21.x
Added logs for humans (3.21)
2 parents dbdd95d + f87dae2 commit 57b3f36

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packaging/common/cfengine-hub/postinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,12 +794,17 @@ if [ ! -f $PREFIX/state/pg/data/postgresql.conf ]; then
794794
else
795795
pgconfig_type="PostgreSQL default"
796796
fi
797+
cf_console echo "No existing postgresql.conf, initializing Postgres"
797798
init_postgres_dir "$new_pgconfig_file" "$pgconfig_type"
798799
fi
799800
if is_upgrade && [ -d "$BACKUP_DIR/data" ]; then
801+
cf_console echo "Upgrade and BACKUP_DIR/data is present, proceeding with full database migration."
800802
do_migration "$new_pgconfig_file" "$pgconfig_type"
803+
else
804+
cf_console echo "Major version of PostgreSQL did not change so simple migration will occur."
801805
fi
802806

807+
803808
(cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl -w -D $PREFIX/state/pg/data -l /var/log/postgresql.log start")
804809

805810
#make sure that server is up and listening

0 commit comments

Comments
 (0)