FIX: Setup swap when RAM <= 4GB (#953)

This commit is contained in:
Rafael dos Santos Silva 2025-04-17 15:04:27 -03:00 committed by GitHub
parent e42fa9711e
commit 721facba64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -193,11 +193,11 @@ check_disk_and_memory() {
exit 1
fi
if [ "$avail_mem" -le 2 ]; then
if [ "$avail_mem" -le 4 ]; then
total_swap=`free -g --si | awk ' /Swap:/ {print $2} '`
if [ "$total_swap" -lt 2 ]; then
echo "WARNING: Discourse requires at least 2GB of swap when running with 2GB of RAM"
echo "WARNING: Discourse requires at least 2GB of swap when running with 4GB of RAM"
echo "or less. This system does not appear to have sufficient swap space."
echo
echo "Without sufficient swap space, your site may not work properly, and future"