Browse Source

fix: compare RAM requirement to system's available RAM

allow numbers with decimal points to be compared
pull/4407/head
Daniel Gibbs 2 years ago
parent
commit
c60ecb35f0
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 2
      lgsm/modules/check_system_requirements.sh

2
lgsm/modules/check_system_requirements.sh

@ -63,7 +63,7 @@ fi
# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
if [ "${ramrequirementgb}" ]; then if [ "${ramrequirementgb}" ]; then
if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
fn_print_dots "Checking RAM" fn_print_dots "Checking RAM"
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available" fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
echo "* ${gamename} server may fail to run or experience poor performance." echo "* ${gamename} server may fail to run or experience poor performance."

Loading…
Cancel
Save