ScratchMonkey wrote:
Does anyone have an initscript that'll work on Fedora?
these scripts works for cs aswell as cs:s and tfc, just change a few
lines where appropriate
i suppose you could add a "sudo -u halflife /home/halflife/startup" line
to /etc/rc.d/rc.local to have it automatically start after reboots.
(the only thing missing, with CS:S locking up the rcon ports, i've been
meaning to put in a longer sleep timer, but that requires recalculating
the other timers which i havent gotten around to. and -restart no doesnt
seem to be working anyway)
you can get the slay script here: http://unix.freshmeat.net/projects/slay/
my halflife users crontab:
5 6 * * * /home/halflife/startup 2>&1 > /dev/null
my root users crontab:
59 5 * * * /usr/bin/slay halflife 2>&1 > /dev/null
----- /home/halflife/startup -----
#!/bin/bash
cd /home/halflife/steams
./steam -command update -game "Counter-Strike Source" -dir
/home/halflife/steams -username xxxxxx -password xxxxxx
-remember_password -verify_all -retry >>/dev/null
./morningbans
cd /home/halflife/bin
screen -wipe
export MALLOC_CHECK_=0
screen -a -m -d -S cs ./runsourcedonut
----- /home/halflife/startup -----
----- /home/halflife/bin/runsourcedonut -----
#!/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 14 -ip 81.7.148.221 -heapsize
196000 +map de_dust2 -restart no
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
----- /home/halflife/bin/runsourcedonut -----
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux