Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packaging/common/cfengine-hub/preinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ fi

if migrating_postgres; then
mkdir -p "$BACKUP_DIR"

# during migration cfpostgres user will need to execute/list files in BACKUP_DIR so ensure it has access via cfpostgres group
/usr/bin/getent group cfpostgres >/dev/null || /usr/sbin/groupadd -r cfpostgres
chown :cfpostgres "$BACKUP_DIR"
chmod 770 "$BACKUP_DIR"

# Try to check if free space on $BACKUP_DIR drive is not less than $PREFIX/state/pg/data contains
if command -v df >/dev/null && command -v du >/dev/null && command -v awk >/dev/null; then
# We have enough commands to test it.
Expand Down
Loading