SRCDS Steam group


how to launch...
#1
Hi all

I´ve been busy reading lots and lots of styff about centos, srcds, screen and a bunch of other stuff I never knew existed :-)
My life so far has been point and click (windows), and behold my horror discovering that I had to learn to "talk" once again configuring our game server running CentOS 4...

This is why I turn to this forum, because even though I still keep searching and reading, I can´t get my server to do what I had intended ;-)

I run a pretty nice machine, IBM Blade,3.4Xeon with 4gigs of RAM and SCSI, on which I have installed centOS 4. My install is:
/home/srcds/ for source dedicated server...
I also have Mani admin mod (latest beta) installed.

My problem is this:
I have a folder called/home/bin/ in this resides 4 files, called runcss1-2-3-4. I am in idiot using most tools, but I managed to get at hold of tunnelier, and this I use for file tranfers and stuff. I use the bitwise xterm that comes with it for command lines.
The runcss files is coded as this:
#!/bin/sh
cd /home/halflife/steams
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
export MALLOC_CHECK_=0
GDB="gdb"
failcount=0
while : ; do
start=`date '+%d%H%M%S'`
echo "hlds started at $start" >>hlds.log
./srcds_run -game cstrike +maxplayers 24 -port 37035 +ip xxx.xxx.xxx.xxx (my IP number here of course:-) -tickrate 66 -heapsize 196000 +map de_dust2 -restart no +servercfgfile server1.cfg
date >>crash.log
stop=`date '+%d%H%M%S'`
t=`expr $stop - $start`
if test 0 -le $t -a $t -lt 20 ; then
failcount=`expr $failcount + 1`
else
failcount=0
fi
if test $failcount -gt 5 ; then
exit 1
fi
sleep 3
done
# EOF

Of course I just have different servercfg files, port numbers and maps on each of them.
But my problem is that I can do runcss1 in /home/bin, and the server will start.
I can log out of SSH and the server will still run.
If I try runcss2, runcss 3or runcss4 the server will start, but the second i shut down SSH the server will stop... :-(
I can also launch each server through the command line using:
./srcds_run -console -game cstrike -port 27015 +ip xxx.xxx.xxx.xxx +map cs_office +maxplayers 16 +exec server2.cfg &
When including the & at the end, I can launch 1 server like this, but not all of them, and it gives me the problem of not knowing how to restart/stop the server :-)

Anybody have a solution for running multiple srcds servers and thus a fix for this problem? :-)

If it will help I can post my servercfg files, mapcycle files and whatnot...
Reply
#2
I (using BSD and linux compat mode) have a complete seperate user and director for each server I want to run. I treat each user as a seperate "mini-server", so I've got 1 SRCDS install per user etc, all in seperate directories.

Thats my startsourceserver script

Code:
echo "Starting Server"
cd ~/srcds
screen -A -m -d -S $3 ./srcds_run -console -norestart -game $1 +map $4 +maxplayers $2 -autoupdate -port $3 -tickrate 100 -pingboost 3
echo "Server Started"

It runs srcds_run within a screen, and continues to run even when I close the SSH connection
Reply
#3
Ah, that´s an excellent idea, thank you very much for that input Smile
Reply
#4
It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it! midtown modern showroom
Reply
#5
I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks One Pearl Bank Showroom
Reply
#6
This post is very simple to read and appreciate without leaving any details out. Great work! perfect ten showflat
Reply
#7
I have read your article; it is very informative and helpful for me. I admire the valuable information you offer in your articles. Thanks for posting it. Bedok point
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)