Skip to content

Commit

Permalink
Release v23.7.1 (#4408)
Browse files Browse the repository at this point in the history
* fix: system requirements bug (#4407)

* fix: added missing variable physmemtotalgb

* fix: compare RAM requirement to system's available RAM

allow numbers with decimal points to be compared

* Release v23.7.1
  • Loading branch information
dgibbs64 authored Dec 10, 2023
1 parent 4b4c559 commit 5cc1a6b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lgsm/modules/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi

# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
if [ "${ramrequirementgb}" ]; then
if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then
if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
fn_print_dots "Checking RAM"
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
echo "* ${gamename} server may fail to run or experience poor performance."
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/core_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

modulesversion="v23.7.0"
modulesversion="v23.7.1"

# Core

Expand Down
7 changes: 4 additions & 3 deletions lgsm/modules/info_distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,16 @@ else
else
humanreadable="-h"
fi
physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # string
physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # integer
physmemtotalgb="$(free -m | awk '/Mem:/ {print $2}')" # integer
physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string
physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string
physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string

oldfree="$(free ${humanreadable} | awk '/cache:/')"
if [ "${oldfree}" ]; then
physmemavailable="n/a"
physmemcached="n/a"
physmemavailable="n/a" # string
physmemcached="n/a" # string
else
physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string
physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string
Expand Down
2 changes: 1 addition & 1 deletion linuxgsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.7.0"
version="v23.7.1"
shortname="core"
gameservername="core"
commandname="CORE"
Expand Down

0 comments on commit 5cc1a6b

Please sign in to comment.