04-03-2007, 12:46 AM
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...
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...