GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.2k stars 802 forks source link

[Bug]: check_system_requirements.sh fails if game is not explicitly listed or if default RAM is not defined as an integer (currently set to 0.5) #4404

Closed Pathas-Gamer closed 4 months ago

Pathas-Gamer commented 7 months ago

User story

As a user, I want Factorio to start. It currently does not. It fails with an error seemingly checking system RAM

Game

Factorio

Linux distro

Ubuntu 22.04

Command

command: start

Further information

It seems ramrequirementgb is supposed to be an integer according to the log output below. However, after all the if/elif for defining the RAM requirements for each game, the final condition sets this value to 0.5 - not an integer.

else ramrequirementgb="0.5" 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 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." fn_sleep_time_5 fi fi

NOTE: Verified the bug disappears by changing the last else/fi from 0.5 to 1. Either the variable needs to be redefined as something supporting non-integer values, or the defined minimum RAM needs to be changed to an integer.

Relevant log output

factoriouser@factorio:~$ ./fctrserver start
[ WARN ] Starting fctrserver: Default RCON password detected
/home/factoriouser/lgsm/modules/check_system_requirements.sh: line 66: [: 0.5: integer expression expected
[ FAIL ] Starting fctrserver: Unable to start TestServer

Steps to reproduce

  1. Install Factorio server
  2. Attempt to start server
  3. Observe error about check_system_requirements.sh line 66
dgibbs64 commented 7 months ago

Thanks, I am aware of the bug with system requirements. I just forgot to fix it before release. However, the system requirements bug is different fro the factorio issue. You have 2 issues that are unrelated. The system requirements bug will not affect factorio from starting

Pathas-Gamer commented 7 months ago

So far with this Factorio installation I have only encountered this bug on line 66 of the system requirements script. What’s the other one I should be looking out for?

Thanks!!

On Mon, Dec 4, 2023 at 3:10 AM Daniel Gibbs @.***> wrote:

Thanks, I am aware of the bug with system requirements. I just forgot to fix it before release. However, the system requirements bug is different fro the factorio issue. You have 2 issues that are unrelated

— Reply to this email directly, view it on GitHub https://github.com/GameServerManagers/LinuxGSM/issues/4404#issuecomment-1838120367, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3COCN6BTBQJPKDV4GBVYO3YHWHO7AVCNFSM6AAAAABAFMSRP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZYGEZDAMZWG4 . You are receiving this because you authored the thread.Message ID: @.***>

FlorianLeChat commented 7 months ago

I get the same warning message with a Garry's Mod server without affecting its startup.

lugaamn commented 7 months ago

cs2@ubuntu:~$ ./cs2server start [ .... ] Starting cs2server: /home/cs2/lgsm/modules/check_system_requirements.sh: line 66: [: 0.5: integer expression expected