Skip to content

Commit b48783e

Browse files
committed
wait 5 minutes for smart shutdown to finish
1 parent a5bf06b commit b48783e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packaging/common/cfengine-hub/postinstall.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,8 @@ if [ -n "$httpds" ]; then
10561056
fi
10571057
fi
10581058

1059-
if ! (cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl stop -D $PREFIX/state/pg/data -m smart"); then
1059+
# wait 5 minutes for smart shutdown to happen, on slower machines it might take a while
1060+
if ! (cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl stop -D $PREFIX/state/pg/data --timeout=300 -m smart"); then
10601061
sleep 300
10611062
su cfpostgres -c "$PREFIX/bin/pg_ctl stop -D $PREFIX/state/pg/data -m fast"
10621063
fi

0 commit comments

Comments
 (0)