From 969cc9b9fd644bd2b0327898c9ee885d8225a341 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 12 Apr 2018 15:45:29 +0800 Subject: [PATCH] Print the actual amount of diskspace required. --- templates/postgres.template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 50c8f01..b1337eb 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -65,7 +65,7 @@ run: required=$(($(du -s /shared/postgres_data | awk '{print $1}') * 2)) if [ "$free_disk" -lt "$required" ]; then - echo "WARNING: Upgrading PostgresSQL would require an addtional $(du -sh /shared/postgres_data | awk '{print $1}') of disk space" + echo "WARNING: Upgrading PostgresSQL would require an addtional $(numfmt --to=si $(($required - $free_disk))) of disk space" echo "Please free up some space, or expand your disk, before continuing." exit 1 fi -- 2.25.1