PDA

View Full Version : Multi Game Server



mad-professor.co.uk
8th August 2006, 20:55
Hi All.

Yes it's me again.

I am trying to setup two Hidden Games on my server, Server #1 [PS:ON] & Server #2 [PS:OFF].

Both of the servers start and run file, But for some resign the 2nd server is not using it's on config settings but is using the 1st servers config settings, So I end up having Server #1 [PS:ON] Listed twice.

Heres what my files look like.

ect/init.d/hlds


#!/bin/bash

case $1 in
start)
# Stuff to do upon startup
/home/hlds/startserver1.sh
/home/hlds/startserver2.sh
;;
stop)
# Stuff to do upon shutdown

;;
esac


home/hlds/startserver1.sh


#!/bin/bash

cd /home/hlds
screen -m -d -S HiddenServer1 ./srcds_run -game hidden -maxplayers 4 -tickrate 66 +ip ###.###.###.### +port 27015 +map hdn_docks


home/hlds/hidden/cfg/server.cfg


// voice support
sv_voiceenable 1

// Maximum 20 minutes between map changes
mp_timelimit 20

// round timer
mp_roundtime 300

// hidden round limit
hdn_hiddenrounds 3

// FF off
mp_friendlyfire 1

// Hostname
hostname "Mad Professor's Hidden Test Server #1 [PS:ON]"

// selection method : 0 - weighting, 1 - classic, 2 - random
hdn_selectmethod 0

// operation
sv_lan 0
sv_region 3

// wait time before first round begins
hdn_jointime 5

// Rcon Settings
rcon_password Bla Bla Bla
sv_rcon_banpenalty 60
sv_rcon_maxfailures 3
sv_rcon_minfailures 3
sv_rcon_minfailuretime 3600

// Log Settings
sv_log_onefile 0
sv_logfile 1
sv_logbans 1
sv_logecho 1
mp_logdetail 3
log on

// Ban Settings
exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

exec mani_server.cfg


home/hlds/startserver2.sh


#!/bin/bash

cd /home/hlds
screen -m -d -S HiddenServer2 ./srcds_run -game hidden -maxplayers 4 -tickrate 66 +ip ###.###.###.### +port 27016 +map hdn_docks +exec server2.cfg


home/hlds/hidden/cfg/server2.cfg


// voice support
sv_voiceenable 1

// Maximum 20 minutes between map changes
mp_timelimit 20

// round timer
mp_roundtime 300

// hidden round limit
hdn_hiddenrounds 3

// FF off
mp_friendlyfire 1

// Hostname
hostname "Mad Professor's Hidden Test Server #2 [PS:OFF]"

// selection method : 0 - weighting, 1 - classic, 2 - random
hdn_selectmethod 0

// Pig Stick
sv_pigstick 0

// operation
sv_lan 0
sv_region 3

// wait time before first round begins
hdn_jointime 5

// Rcon Settings
rcon_password Bla Bla Bla
sv_rcon_banpenalty 60
sv_rcon_maxfailures 3
sv_rcon_minfailures 3
sv_rcon_minfailuretime 3600

// Log Settings
sv_log_onefile 0
sv_logfile 1
sv_logbans 1
sv_logecho 1
mp_logdetail 3
log on

// Ban Settings
exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

exec mani_server2.cfg

mad-professor.co.uk
8th August 2006, 21:39
I think I might have my own answer, I will try it out in the morning.

Paegus
8th August 2006, 23:10
use +servercfgfile server2.cfg instead of that +exec whatever crap...
the server will always execute whatever servercfgfile (or listenservercfgfile if it's a listen server btw) is set to at the beginning of every map.

also i believe it's -port # not +port #

alternatively if you want almost completely independant operations such as different addon settings you can #cp -s /home/hlds/server1 /home/hlds/server2 and then just overwrite the softlinks you don't want to share between the 2. such as mapcycle files.

and on that note i believe there is also a mapcyclefile cvar that you can set in server2.cfg to something other than mapcycle.txt. just fo a find file in the console for a list of ssuch cvars.