[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.cfg is being overwritten upon startup file validation #49

Open
Jay2k1 opened this issue Aug 9, 2024 · 3 comments
Open

server.cfg is being overwritten upon startup file validation #49

Jay2k1 opened this issue Aug 9, 2024 · 3 comments

Comments

@Jay2k1
Copy link
Jay2k1 commented Aug 9, 2024

This is probably not an issue with this egg, but honestly, I do not know where else to look or ask.

My problem

I have set some things like server name and password in game/csgo/cfg/server.cfg. This works fine until an update is released and I restart the server (container). Upon restart, it downloads the update. My other CS2 servers then run a verify when they're restarted (details below), and this verify causes the server.cfg to be replaced by the original server.cfg. This is even logged in Steam/logs/content_log.txt:

[2024-08-09 03:00:43] Validation: 0 chunks corrupt and 1 chunks missing of 1 total in file "game\core\pak01_dir.vpk"
[2024-08-09 03:00:44] Validation: truncated unwanted 70 bytes from file "game\csgo\cfg\server.cfg"

Edit: This also happens when you trigger a manual validation by setting "Validate Install" (SRCDS_VALIDATE) to 1 in the panel:

[2024-08-09 17:00:46] AppID 730 update changed : Running Update,Validating,
[2024-08-09 17:00:57] Validation: truncated unwanted 71 bytes from file "game\csgo\cfg\server.cfg"

After validation, the file is back to its default contents:

// Defaults in server_default.cfg

Questions I have

  • this is probably a bug, but where exactly? In https://github.com/ValveSoftware/steam-runtime/ ?
  • is there a better place for me to put custom global server settings? maybe my-own-server.cfg and then adding -exec my-own-server to the "Startup Command" in the panel?
  • is there a better way to have shared files in cs2 servers in pterodactyl? (see below)

Details why (I think) the validation happens

I run several CS2 servers. By default, each install would occupy about 42 GB, so I created a mount in Pterodactyl that I use for all CS2 eggs (/cs2-base) and moved big files/folders that are identical in all servers there and then symlinked them. It's mostly the vpk files and the panorama and maps folders. The game/csgo folder looks like this:
image

This moving-and-replacing-by-symlink is automated by a script that runs 30 minutes after the first cs2 server (let's call it the master server) has its daily restart. The script would check for any non-symlinked vpk files and if it finds any, it moves them to the base folder and symlinks them.

An hour later, the other cs2 servers get their daily restart. When an update was released, they for some reason realize that there was a change - even though they already have the updated vpk files (due to the symlinks) - and run a verify. This finds issues with the updated vpk files (it shouldn't, again, the new files are already there due to the symlinks, but maybe checksums aren't computed live but stored somewhere, who knows) and the vpk files are redownloaded, requiring another run of my "relink-files" script afterwards.
Either way, this validation is what causes the server.cfg to be messed with. The validation does not occur on the first server (the master server) when it restarts and there is an update available, which might explain why other people don't seem to have this issue. I'm probably the only one who runs it like this...

@ItsCEED
Copy link
ItsCEED commented Sep 1, 2024

@Jay2k1 can ya hook me with that script? 👀

@Jay2k1
Copy link
Author
Jay2k1 commented Sep 1, 2024

sure: https://gist.github.com/Jay2k1/17d4a50779a8250ff78b5ac1254e08e0

@M-archand
Copy link

is there a better place for me to put custom global server settings?

Yes, put them in gamemode_<yourgamemode>_server.cfg, so if custom for eg, then put them in gamemode_custom_server.cfg

@Jay2k1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants