I've attached the bash script that I've used and improved upon for
years now to start my TF2 servers. It assumes there's a servercfgfile
named server_<portnumber>.cfg that contains the settings specific for
that instance, for example your server identity and logdir. It starts
the first server on port 27015 and works it's way up in increments of
10.

Using the -strictportbind option just makes the server quit (and
restart over and over if autoupdate is set) if one or more of the
ports it wants to use is unavailable, instead of just picking a higher
portnumber. For that reason I stopped using it, since I let the server
assign all other ports by itself.

If anyone has any comments, questions or suggestions about my script
feel free to ask.

On Sun, Feb 10, 2013 at 6:11 AM, Landon Orr <lando...@gmail.com> wrote:
> Alright, so I've disabled sourcetv and set the client port, that seems to
> have cleared it up. I'm working on a script that will start multiple
> servers, and have the server's ports be in intervals of 5. Here's the
> command I'm using to start them, it's been working great so far but let me
> know if you guys have any suggestions.
>
> ./srcds_run -game tf -autoupdate -steambin /home/tf2user/hlds/steam
> -maxplayers 32 -port 27015 -nohltv +clientport 27115 +map mvm_coaltown
> +servercfgfile mvmserver1.cfg +motdfile mvmmotd.txt +mapcyclefile
> mvmmapcycle.txt
>
> I specify the maplist, mapcycle and motd files as I have different configs
> for MvM.
>
>
>
> On Sat, Feb 9, 2013 at 10:06 PM, Nomaan Ahmad <n0man....@gmail.com> wrote:
>
>> You can put it in the startup like: +tv_port 27021
>>
>> On 10 February 2013 04:49, Sam White <s...@zamnet.co.uk> wrote:
>>
>> > I believe it's tv_port
>> >
>> > On 10 February 2013 04:15, Joel Zhang <know.thine.en...@gmail.com>
>> wrote:
>> >
>> > > I am pretty sure there is a parameter for changing source TV's port as
>> > > well, but I can't remember offhand which.
>> > > On Feb 9, 2013 7:25 PM, "[BT]Black V" <bt.bla...@gmail.com> wrote:
>> > >
>> > > > Isn't there a strict port command too?
>> > > > On 10 Feb 2013 15:47, "Andreas Grimm" <l...@gmx.net> wrote:
>> > > >
>> > > > > You can add "-nohltv" to your start parameters if you don't use
>> > source
>> > > > tv.
>> > > > > Then the gameserver doesn't bind additional ports.
>> > > > >
>> > > > >  - Andreas
>> > > > >
>> > > > > -----Original Message-----
>> > > > > From: hlds_linux-boun...@list.valvesoftware.com
>> > > > > [mailto:hlds_linux-boun...@list.valvesoftware.com] On Behalf Of
>> > Steve
>> > > > > Dudenhoeffer
>> > > > > Sent: Sunday, February 10, 2013 3:38 AM
>> > > > > To: Half-Life dedicated Linux server mailing list
>> > > > > Subject: Re: [hlds_linux] Overlapping port usage when running
>> > multiple
>> > > > > servers on one machine
>> > > > >
>> > > > > tv_port defaults to 27020
>> > > > >
>> > > > > On Sat, Feb 9, 2013 at 9:17 PM, Giovanni Harting <
>> > > > > chefeification...@gmail.com> wrote:
>> > > > >
>> > > > > > There are some port that the game tries to bound automaticly,
>> maybe
>> > > > there
>> > > > > > are some cvars to control that ....
>> > > > > >
>> > > > > > For all command line specific, look here:
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicat
>> > > > > ed_Server
>> > > > > >
>> > > > > >
>> > > > > > 2013/2/10 Landon Orr <lando...@gmail.com>
>> > > > > >
>> > > > > > > So that specified one of the ports, however when I run the
>> > server,
>> > > > it's
>> > > > > > > still trying to use 27020, which is in use. Is it possible to
>> > > specify
>> > > > > > that
>> > > > > > > one as well?
>> > > > > > >
>> > > > > > >
>> > > > > > > On Sat, Feb 9, 2013 at 7:03 PM, Joel Zhang <
>> > > > know.thine.en...@gmail.com
>> > > > > > > >wrote:
>> > > > > > >
>> > > > > > > > The parameter is "-port 27025", for example.
>> > > > > > > > On Feb 9, 2013 6:00 PM, "Landon Orr" <lando...@gmail.com>
>> > wrote:
>> > > > > > > >
>> > > > > > > > > Currently I'm trying to host multiple servers on one
>> machine.
>> > > > It's
>> > > > > a
>> > > > > > > very
>> > > > > > > > > beefy machine, two 16-core AMD processors and 64 gigs of
>> > > memory,
>> > > > so
>> > > > > > I'd
>> > > > > > > > > like to run quite a bit of servers, 30+ if possible.
>> However,
>> > > I'm
>> > > > > > > running
>> > > > > > > > > into an issue when I spin up more than fiver servers or so.
>> > > Right
>> > > > > now
>> > > > > > > I'm
>> > > > > > > > > having issues with ports overlapping, as in the servers try
>> > to
>> > > > > > request
>> > > > > > > a
>> > > > > > > > > port but it's already in use. For the first five they would
>> > > just
>> > > > > use
>> > > > > > > the
>> > > > > > > > > next port up. However, it seems that a server uses two
>> ports
>> > > > > (correct
>> > > > > > > me
>> > > > > > > > if
>> > > > > > > > > I'm wrong) 27015 and 27020. After five servers, the next
>> > server
>> > > > > tries
>> > > > > > > to
>> > > > > > > > > use 27015, it's in use so it tries 27020 and then it gives
>> > up.
>> > > > > > > > >
>> > > > > > > > > I know when you use the srcds_run command, there is a way
>> to
>> > > > > specify
>> > > > > > > the
>> > > > > > > > > port to use, but I can't remember the command. Also, how
>> many
>> > > > ports
>> > > > > > do
>> > > > > > > I
>> > > > > > > > > have to specify? Just two, or are there more than that?
>> > > > > > > > > _______________________________________________
>> > > > > > > > > To unsubscribe, edit your list preferences, or view the
>> list
>> > > > > > archives,
>> > > > > > > > > please visit:
>> > > > > > > > >
>> > > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > > > > > >
>> > > > > > > > _______________________________________________
>> > > > > > > > To unsubscribe, edit your list preferences, or view the list
>> > > > > archives,
>> > > > > > > > please visit:
>> > > > > > > >
>> > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > > > > >
>> > > > > > > _______________________________________________
>> > > > > > > To unsubscribe, edit your list preferences, or view the list
>> > > > archives,
>> > > > > > > please visit:
>> > > > > > >
>> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > > > >
>> > > > > > _______________________________________________
>> > > > > > To unsubscribe, edit your list preferences, or view the list
>> > > archives,
>> > > > > > please visit:
>> > > > > >
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > > >
>> > > > > _______________________________________________
>> > > > > To unsubscribe, edit your list preferences, or view the list
>> > archives,
>> > > > > please visit:
>> > > > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > >
>> > > > >
>> > > > > _______________________________________________
>> > > > > To unsubscribe, edit your list preferences, or view the list
>> > archives,
>> > > > > please visit:
>> > > > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > > >
>> > > > _______________________________________________
>> > > > To unsubscribe, edit your list preferences, or view the list
>> archives,
>> > > > please visit:
>> > > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > > >
>> > > _______________________________________________
>> > > To unsubscribe, edit your list preferences, or view the list archives,
>> > > please visit:
>> > > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> > >
>> > _______________________________________________
>> > To unsubscribe, edit your list preferences, or view the list archives,
>> > please visit:
>> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>> >
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux
>>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux



--
Idleness is not doing nothing. Idleness is being free to do anything.
  - Floyd Dell
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux

Reply via email to