Update config.sh

This commit is contained in:
Kroese 2024-05-03 11:28:09 +02:00 committed by GitHub
parent 576682cda1
commit baf9d9aabc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,9 +35,7 @@ fi
# Check available memory as the very last step
RAM_AVAIL=$(free -b | grep -m 1 Mem: | awk '{print $7}')
RAM_TOTAL=$(free -b | grep -m 1 Mem: | awk '{print $2}')
AVAIL_GB=$(( (RAM_AVAIL + 1073741823)/1073741824 ))
TOTAL_GB=$(( (RAM_TOTAL + 1073741823)/1073741824 ))
if (( (RAM_WANTED + 500000000) > RAM_AVAIL )); then
error "Your configured RAM_SIZE of $WANTED_GB GB is higher than the $AVAIL_GB GB of memory available, please set a lower value."