Pages: [1]
  Print  
Author Topic: Hello; new servers; start server script  (Read 4238 times)
Phenax
Nub


Cakes 0
Posts: 3


« on: November 22, 2007, 11:53:25 PM »

Hello I have put up two servers in Texas. Weapon X CTF TEXAS and Weapon X 1on1 TEXAS. I saw a lack of 1on1 servers in America.
shockcore.com:27960 - ctf
shockcore.com:27970 - 1on1


I have made a script to launch servers in shell. It launches each server in a screen for every .cfg file it finds. It increments each port 10 from startingport for each .cfg.
You should make directory ~/.openarena/baseoa/servercfgs/ directory and put all of your server cfgs in there. Then configure top (if you just make that dir, and put your cfgs in there, only have to modify execpath.)
 I'm not sure if anyone wants it but I might as well post Wink

Please post here about any question or suggestion about servers or script, thx.

Code:
#!/bin/sh

### CONFIGURE STUFF BELOW ###
execpath=~/oa/openarena-0.7.1/
execname=ioq3ded.i386
cfgpath=~/.openarena/baseoa/servercfgs/
cfgprefix="servercfgs/"
startingport=27960
###END CONFIGURE STUFF BELOW ###

x=${startingport}
cd ${cfgpath}
rm *.screenrc
for i in `ls *.cfg`; do
        cd ${cfgpath}
        hostname=`cat ${i} | grep sv_hostname | sed 's/set\ \|sv_hostname\ \|\"//g' | sed 's/\ /_/g'`
        screenname="${hostname}_${x}"
        echo "Server Started. Screen name is ${hostname}_${x}"
        echo "screen -t ${x} ./${execname} +set dedicated 2 +set net_port ${x} +exec ${cfgprefix}${i}" > ${hostname}_${x}.screenrc
        cd ${execpath}
        screen -c ${cfgpath}/${hostname}_${x}.screenrc -dmS ${screenname}
        cd ${cfgpath}
        x=`expr $x + 10`
done

« Last Edit: November 23, 2007, 12:54:17 PM by Phenax » Logged
Pages: [1]
  Print  
 
Jump to: