Closed Amenel closed 7 years ago
LGSM already allows multiple servers with the same content. https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers
Not sure the fork thing would be useful then. Any link to a doc so that we can see it with our own eyes ?
Well, it's at an address that LGSM pointed me too :-) https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server. See the Linux command options in Left 4 Dead section.
In my case, I have followed instructions at http://forums.steampowered.com/forums/showthread.php?t=745441: I've created two config files l4d-server01.cfg
and l4d-server02.cfg
(so that server names would be different in Gametracker banners). I've renamed l4dserver.cfg
to l4dserver.cfg.original
and modified the l4dserver
script as follows:
port="27015"
-> port="27014+##"
clientport="27005"
-> clientport="27004+##"
servercfgexec="${servicename}##.cfg"
right below servercfg="${servicename}.cfg"
The fn_parms()
parameter definition line was changed to (added -fork 2
; added +exec ${servercfgexec}
)
fn_parms(){
parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +exec ${servercfgexec} +map ${defaultmap} -maxplayers ${maxplayers} -fork 2"
}
Reading the Linux command options in Left 4 Dead section again, I realize that it may not even be necessary to modify port
and clientport
.
NOTE: after sending in the OP, there was a game on the first server (on port 27015) and the L4D console command (./l4dserver console
) showed messages of that first server. Apparently, Source adds the number of the server (e.g. #01
) as a prefix to server messages in the console. That was well thought of them.
Well, i checked it. I personally would rather use LGSM way to make multiple servers. That's something to try out, maybe useful for people wanting to deploy plenty of similar servers at the same time, but that i wouldn't see implemented natively. Also i don't like the automatic port thing.
We had a few issues using forked cs:go servers. To achieve the same effect, you can use overlayfs for each instance. Just remember to umount the forked folders before updating.
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.
I've just installed a Left 4 Dead 1 server, my first game server ever, and thanks to lgsm, it was a piece of cake.
According to Valve's documentation of srcds, Left 4 Dead brought a feature that allows forking several servers from one instance of srcds. The servers are then, when correctly configured, assigned port numbers in a sequential order. For instance, by specifying
port="27014+##"
with-fork 2
, I got two L4D servers running at ports 27015 and 27016 (##
represents the sequential number of the server).It seems like
l4dserver
only shows the details of the last server (in my case, the one at port 27016). Is there anything I can do to query the one at 27015, or is it just that support for forked servers were simply not considered before?