scripts/check-upgrade-space
Michal Čihař 7962c43752
Some checks are pending
Pre-commit check / pre-commit (push) Waiting to run
Test / native (push) Waiting to run
Test / system (push) Waiting to run
Test / docker (push) Waiting to run
fix: corrected condition
2025-11-01 07:29:08 +01:00

9 lines
272 B
Bash
Executable file

#!/bin/sh
needed=$(du -s -BM /home/weblate/postgresql/ | awk '{print $1}' | tr -d M)
available=$(df -BM --output=avail /home/weblate/ | tail -n1 | tr -d M)
if [ "$available" -lt $((needed * 2)) ]; then
echo "Available $available, current size $needed"
exit 1
fi