[cod] Linux dedicated servers auto init
Josh Berry
games at chickenmonkey.co.uk
Thu Apr 29 11:49:33 EDT 2004
Here is my startup script if it helps at all:
#!/bin/sh
while true
do
N=`ps -ef | grep cod_lnxded | grep -v grep | wc -l`
if [ $N -eq 0 ]
then
cd /usr/local/games/CoD/
./cod_lnxded +set (all the rest of your arguments)
fi
sleep 60
done
On Thu, 2004-04-29 at 15:17, João Campos wrote:
> I have a script to Run Servers:
> Can u explian it better?
>
>
> #!/bin/sh
> #
> # Script de arranque de servidor de Call of Duty
> # Por Joao Campos aka XpuritanX
> # Stormtroopers of Death - 2004
> #
> echo "Script de arranque de servidores - por XpuritanX"
> #
> #===========================================================================
> =======
> # Preencher as variaveis:
> #
> SERVER="/games/cod-server"; # PATH PARA O SERVER
> SLOTS="16"; # NUMERO DE SLOTS
> IPADDRESS="193.126.30.10"; # IP DO SERVER
> USER="cod-sod"; # USER QUE CORRE O SERVER
> CONFIG="config.cfg"; # NOME DA CONFIG
> PORT="28960"; # PORTA DO SERVER
> #
> # Nao mexer daqui para baixo
> #===========================================================================
> ========
>
> export HOME="/home/$USER";
>
> cd ${SERVER};
> exec 2>&1
> nohup ./cod_lnxded +set dedicated 2 +set net_ip ${IPADDRESS} \
> +set fs_homepath ${HOME}/cod-server +set net_port ${PORT} \
> +set com_Hunkmegs 128 +set sv_pure 1 +set sv_maxclients
> ${SLOTS} \
> +exec ${CONFIG} +map_rotate \
> &
>
>
> **End**
>
> Please explain me better
> Cheers
> Joao Campos
>
> ----- Original Message -----
> From: "Daniel M. Temme" <cod at schlechteverlierer.de>
> To: <cod at icculus.org>
> Sent: Thursday, April 29, 2004 10:10 AM
> Subject: Re: [cod] Linux dedicated servers auto init
>
>
> On Wednesday 28 April 2004 20:24, João Campos wrote:
> > Hi, i need some help.
> > I have a dedicated server running and i want to know if theres some script
> > that on "Rcon quit" comand to reload server's pk3 dont let the server goes
> > down and run the server again.
>
> Just loop the startup command. I.e.
> cd <wherever cod is installed>
> while true; do ./cod_lnxded; sleep 5; done
>
> Either put that in a script or just do it from the command line/screen where
> you normally start it.
>
> I hope this helps.
>
> Have a nice day
--
Josh
http://www.chickenmonkey.co.uk
More information about the Cod
mailing list