mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #903] [all mods] use yaml file to configure server #721
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#721
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @abenevaut on GitHub (Jun 27, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/903
Because i am a little be in pain when i update the server main file (like this one)
I request the availability to manage configuration from a yaml file, or whatever else but an external file.
@jaredballou commented on GitHub (Jun 27, 2016):
Take a look at my fork, which creates a ~/lgsm/servers/cssserver/cfg directory with Bash config files. I haven't been keeping it up to date with upstream, and I haven't worked on it in a month or so. I haven't tried CSS, I only tested with Insurgency, but if you want to give that a try I'd be glad to help you get it working.
If none of that scares you, download the lgsm-core script (directions in the README) and give it a shot. It also uses my gamedata structure, so instead of creating a complete separate script for each game, I was supporting them via small addon scripts off the core.
As far as next gen, I am working on https://github.com/jaredballou/lgsm-python which is a complete ground-up rebuild using the gamedata design in Python. All configs will be in YAML or JSON format, it'll have a lot of menu driven features, and generally be more reliable than relying on Bash to interpret text.
If you want to throw out other ideas and suggestions for the next gen tool, I'm all ears.
@UltimateByte commented on GitHub (Jun 28, 2016):
That's something we have in mind since a while btw, but didn't figure out how to implement in a way that makes sense for lgsm yet. There might be a way with jaredballou's work but as my python lvl is 0 i can't be any help here. :)
@dgibbs64 commented on GitHub (Jun 28, 2016):
Something like that is planned eventually when the time is right. However it's gunna take time. Although python was considered I simply do not have the time to rework several years worth of work.
@abenevaut commented on GitHub (Jun 28, 2016):
I will try to propose something in few weeks, limited to my own needs (teamspeak, css, csgo servers).
I am thinking about something like this https://gist.github.com/epiloque/8cf512c6d64641bde388, so a parser without need to third party tools.
@togenshi commented on GitHub (Nov 24, 2016):
If we can separate the server script into 2, whereby 1 is user variables (including parms variable) and 1 is the rest of the script, that would help immensely if say we need to update the base script or dynamically create user variables on the fly.
Its not so bad if you manage the one server but when you run gaming servers for 1000+ people lan, it gets tedious even if you try automate it with ansible. With csgo for example, I got gslt, web api token, workshop, workshop start map, tick rate, team names, hostname, port, server password, etc to pass into the parms list.
Just fyi I use overlayfs for each gaming server instance and use linked clones on a vmware cluster to run the servers.
@JimTR commented on GitHub (Nov 25, 2016):
Just connect to a database and throw the config in there everything in an array
@abenevaut commented on GitHub (Nov 25, 2016):
Here, a very basic example and a beginning of advancement on what I could (if you like) propose.
csgoserver_test : the csgo installer test file; look at the "exit;" at the bottom of file, like this only the yaml parsing is executed.
config.yml : a simple example of config file
new or edited files : lgsm/functions/core_yaml.sh & lgsm/functions/core_functions.sh
- commit 1
- commit 2
Based on this code
Nothing yet to propose a pull request. What do you think of this piece of code? I continue ?
@dgibbs64
@togenshi commented on GitHub (Nov 25, 2016):
Fyi I have the following on top of my csgocomp:
hostname=""\"RFLAN PLE CS:GO - BRACKET A - Match Server #1\"""
password="password"
wm_save_dir="rflan"
Parameters:
fn_parms(){
parms="-game csgo -usercon -strictportbind -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey} +hostname "$hostname" +sv_password ${password} +wm_save_dir ${wm_save_dir}"
You could pass the arguments in for any custom variables such as team names.
The issue I have is escaping the quotes and spaces. But it seems prefixing ""\" and postfixing \""" the variable works from within the script.
I am all for introducing a separate config file for start up paramaters/gslt/api tokens but I do not believe that YAML is a good choice.
@dgibbs64 commented on GitHub (Sep 19, 2017):
I have previously looked in to yaml and I don't believe it will fit well with bash. There was a recent major update that separates config files from the main script that was chosen.
@lock[bot] commented on GitHub (Sep 19, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.