Skip to content

Commit

Permalink
Fix free disk space calculation take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
xfalcox committed May 12, 2020
1 parent 882358d commit a92a925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/postgres.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ run:
if [ ! "12" = "$PG_MAJOR_OLD" ]; then
echo Upgrading PostgreSQL from version ${PG_MAJOR_OLD} to 12
free_disk=$(df -P /shared | tail -n 1 | awk '{print $4}')
free_disk=$(df -P -B1 /shared | tail -n 1 | awk '{print $4}')
required=$(($(du -sb /shared/postgres_data | awk '{print $1}') * 2))
if [ "$free_disk" -lt "$required" ]; then
Expand Down

0 comments on commit a92a925

Please sign in to comment.