./gameserver
is the main entry point for users, their main interactions will be with this script. However, from a development perspective, this is only the gateway as it simply does initial the bootstrap and points to the commands and modules that are stored elsewhere. LinuxGSM is made up of many smaller (mainly bash) scripts (modules) that interact with each other to complete a set of tasks. A command will complete its set of tasks using the LinuxGSM modules.linuxgsm.sh
or gameserver.sh
is what the user interacts with to run commands.linuxgsm.sh
is designed to be used for the installation of a specific game server. You can run ./linuxgsm.sh install
to get a menu of the available servers or ./linuxgsm.sh gameserver
to install the specific game server.linuxgsm.sh
first downloads a complete list of all available servers from serverlist.csv
. This file contains variables required to identify the server; ${gamename}
, ${shortname}
and ${servername}
. When installing a game server linuxgsm.sh
copies itself using the${servername}
variable as the script name and inserting the other variables into the copied file. The added variables allow LinuxGSM to know which server the user selected.gameserver-2
,gameserver-3
etc as the file name.## SteamCMD Login
section needs to be present only if the game server requires a steam connection.fn_parms
and its parms=""
variable to call those start parameters../gameserver
without an argument. Either use an existing opt or make a new one if needed.command_install.sh
runs fix.sh
at the end of server installation. If the given server requires a fix, then add fix_gameserver.sh
and run it from fix.sh
.gameserver
is executed. This script allows for fetching LinuxGSM core files, but also for downloading big files within kind of an API.gameserver
is executed. This script declares all functions and fetches them when they are required.gameserver
is executed. This script allows for setting and printing available commands to the user.fn_print_whatever "This is your message"
If you want to replace the line afterwards, then reuse fn_print_whatever
. If you want a new output on a new line, then use fn_print_whatever_nl
. "nl" stands for "new line".fn_script_log "Message goes here."
Output: ## Feb 28 14:56:58 ut99-server: Monitor: Message goes here.
check.sh
at some point. Within check.sh
, you will then choose what tests to run for a given function. The syntax of check.sh is a bit counter-intuitive: local allowed_commands_array=( )
is the variable where you will enter the functions into which you need to run the following check.core_exit.sh
defaults exitcode variable to 0 which stands for a proper exitupdate_ts3.sh
version="YYMMDD"
./gameserver uf
will grab new files. If you make a change and that ./gameserver uf
don't get them, it means you were too quick, and that your curl still has old files in cache; in this case, you'll need to wait a few minutes to get your modifications../gameserver
to show available commands, then try commands one by one. A common procedure is to first work on command_install, then start, then stop, then debug, then details, then monitor../gameserver dev-debug
that will add a very detailed log into your rootdir that might help you figure this out. To disable the dev-debug mode, just re-run the command. If you still can't find why it's not working, come get help on Discord's #gsm-development channel or Github issue that might have been created for this issue.