[cod] Start server using screen problem

Carlo Moretto Carlo at LondonEngland.co.uk
Thu Dec 9 10:01:10 EST 2004


hi guys,

I have 2 scripts per server that check to see if the server is up and
running and the main script is run via cron every 1 minute

here is the script that is run via cron:

#!/bin/bash
#
gamedir=/home/games/status/cod/
pidfile=cod1.pid

cd $gamedir
if [ -f $pidfile ]; then
        kill -0 `cat $pidfile` >/dev/null 2>&1
        if [ $? -ne 0 ]; then
        ./start_cod1 >/dev/null 2>&1
        fi
else
        ./start_cod1 >/dev/null 2>&1
fi

here is the start_cod1 script:

#!/bin/bash
cd /home/games/cod/

./cod_lnxded +set net_ip ###### +set fs_homepath /home/games/logs/cod/ +exec
cod1.cfg  +map_rotate  & echo $! >/home/games/status/cod/cod1.pid


Now, if I wanted to start this server via screen, where would I put the
various screen commands (screen -dmS, screen -r etc etc)

Many thanks




More information about the Cod mailing list