SRCDS Steam group


multiple servers and cfg file questions.
#1
Hey hey hey, I want to write the scripts to start up multiple servers of the same game type running either hlds or srcds, and I have some questions.

for each server to be run with the srcds binary, I'd need a config right? If not a full server.cfg, then maybe a game.cfg to tack on to it, right? So if I was to have one server.cfg for each game server I want to run (with differant command line options too), and I'd have to put it in dod/cfg. Well my main thing is, it reads the server.cfg at every level restart, or map change, so I cant really see how swapping out the server.cfg files with symlink action in the script, would help me if when theres a map change in either running game server, OF THE SAME TYPE, in this case Day of Defeat: Source.

Or does it only read server.cfg at startup, once? in that case what I have right now should work. Please advise, thanks.
Reply
#2
just copy the install folder /srcds to /srcds1 /srcds2 /srcds3 and make different configs in each, it's the easiest way.
Reply
#3
Whoa? Copy all that content? As far as I see it, I should have only a srcds, and hlds folder, so I cant run multiple servers because they each feed off a server.cfg file at startup AND at map change? how do I, via a command line parapamter, have it exec another cfg file?
Reply
#4
it's not that big (~1.5G) and doesn't take that long, are you low on hd space or something? you can use "+exec whatever.cfg" in your startup line but any plugins that you have in your "addons" folder will be loaded for ALL servers no matter which config you exec. they may or may not work depending on how you configure them.
Reply
#5
Im not gonna copy all that shit over. ILl work something with +exec and see how stuff goes when I get to mods, whats the most current admin mod out there? mani-mod? metamod? this is primaryily for day of defeat source
Reply
#6
without getting into mods, this seems to work, however I cant seem to override certain cvars, like hostname. Is that the kinda thing Id have trouble with with mods?
Reply
#7
don't run dods so can't help you there, good luck. all it takes is the cp command and a couple minutes....
Reply
#8
You could try symlinking, that would save alot of diskspace. But I can't help you get that to work - you might have problems with what the current directory is and all when you execute the server.
Reply
#9
i guess you can try symlinking everything but the addons and cfg folders but like furiousV said i don't know how srcds will see it (if it works).
Reply
#10
I do symlinking on my servers. I basically have a "main" (say main_css) srcds directory that contains every file. Then for my dup dirs i do this:

Code:
ln -sf /opt/CSS/main_css/cstrike/maps /opt/CSS/server2_css/cstrike/maps
ln -sf /opt/CSS/main_css/cstrike/sound /opt/CSS/server2_css/cstrike/sound
ln -sf /opt/CSS/main_css/cstrike/materials/opt /CSS/server2_css/cstrike/materials
ln -sf /opt/CSS/main_css/cstrike/models /opt/CSS/server2_css/cstrike/models

You can also symlink the hl2 folder, but I foget the direct path right now, but it would follow the same as above.

So whenever I install new resources I just install them into the main_css directory and all my other servers will see them. I also symlink my addons and cfg folders, but I only symlink files that are the same (not the entire folder), such as mani files (if I update mani on the main install then all servers get updated, of course all servers will restart when it sees this happen and I don't symlink specific files like mani_server.cfg and clients.txt, etc). Makes updating common plugins on all of the servers very easy. But you do have to be careful when doing this if you want servers with different plugins running. One thing you do not want to symlink is the gameinfo.txt file... that was such a pain to deal with. I also never symlink the server.cfg and autoexec.cfg for obvious reasons. Symlinking the banned_users.cfg and banned_ip.cfg files also produces weird results, sometimes resulting in the lists being wiped. So it's easier to not symlink the cfg folder and in most cases the addons folder as well unless you are sure you can get away with symlinking (you can usually safely symlink the .so and .vdf files).

But the biggest HD savers are the ones I listed above in the code block.
Reply
#11
well there you go, i'm off to try it now myself! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)