[cod] Linux dedicated servers auto init
Daniel M. Temme
cod at schlechteverlierer.de
Thu Apr 29 11:54:17 EDT 2004
On Thursday 29 April 2004 16:17, João Campos wrote:
> I have a script to Run Servers:
> Can u explian it better?
I can give it a try. I'll just comment on the actual commands to hopefully
make it more readable.
> exec 2>&1
This redirects stderr into stdout. Seems kinda redundant as nohup will
redirect both again (see info nohup).
At this point you could now add the lines (marked by +) to constantly loop the
gameservice. It's very important that you remove the trailing backslash and
ampersand though. Otherwise you start a new server every 5 seconds.
+ while true; do
> 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 // remove this backslash \
> //and remove the ampersand &
+ sleep 5
+ done
The whole nohup stuff is the line that starts the actual server (with
cod_lnxded being the actual server program).
(On a sideniote... as I'm curious... using nohup for server programs seems a
bit pointless. Is there any daemon that actually acts on HUP?)
I'm not sure if this is what you were looking for but have fun anyways.
Have a nice day
--
Daniel M. Temme
http://schlechteverlierer.de
More information about the Cod
mailing list