We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64a8e11 commit 7c4b756Copy full SHA for 7c4b756
packaging/common/cfengine-hub/postinstall.sh
@@ -431,6 +431,14 @@ if [ ! -d $PREFIX/state/pg/data ]; then
431
cp -a "$new_pgconfig_file" "$PREFIX/state/pg/data/postgresql.conf"
432
chown cfpostgres "$PREFIX/state/pg/data/postgresql.conf"
433
fi
434
+
435
+ # Preserve the recovery.conf file if it existed, it defines how this
436
+ # PostgreSQL should behave as a slave (has to be done AFTER checking/writing
437
+ # the postgresql.conf file above).
438
+ if [ -f "$BACKUP_DIR/data/recovery.conf" ]; then
439
+ cp -a "$BACKUP_DIR/data/recovery.conf" "$PREFIX/state/pg/data/recovery.conf"
440
+ chown cfpostgres "$PREFIX/state/pg/data/recovery.conf"
441
+ fi
442
443
444
0 commit comments