feat: Check RAM amount available (#54)
This commit is contained in:
parent
da1dab956f
commit
576682cda1
2 changed files with 3 additions and 3 deletions
|
@ -41,10 +41,10 @@ TOTAL_GB=$(( (RAM_TOTAL + 1073741823)/1073741824 ))
|
||||||
|
|
||||||
if (( (RAM_WANTED + 500000000) > RAM_AVAIL )); then
|
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."
|
error "Your configured RAM_SIZE of $WANTED_GB GB is higher than the $AVAIL_GB GB of memory available, please set a lower value."
|
||||||
exit 15
|
exit 17
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( (RAM_WANTED + 1950000000) > RAM_AVAIL )); then
|
if (( (RAM_WANTED + 1450000000) > RAM_AVAIL )); then
|
||||||
warn "your configured RAM_SIZE of $WANTED_GB GB is much too close to the $AVAIL_GB GB of memory available, please set a lower value."
|
warn "your configured RAM_SIZE of $WANTED_GB GB is much too close to the $AVAIL_GB GB of memory available, please set a lower value."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ echo
|
||||||
|
|
||||||
if (( (RAM_WANTED + 500000000) > RAM_AVAIL )); then
|
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."
|
error "Your configured RAM_SIZE of $WANTED_GB GB is higher than the $AVAIL_GB GB of memory available, please set a lower value."
|
||||||
exit 15
|
exit 17
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
|
|
Loading…
Reference in a new issue