View Single Post
Old 05-01-2002, 07:05 PM   #7
Senior Member
Join Date: Apr 2002
Location: Southern California
Posts: 1,199
I use a combination of 3 scripts to set this up, which isn't necessay, but I use it.

startjk2 -- I use ./startjk2 to run the server

echo -n "Starting - "
date "+%D %H:%M:%S"
cd /usr/local/games/jk2
screen -d -m ./holdjk2

holdjk2 -- This is what really restarts the server

echo Ok
while 1
date "+%D %H:%M:%S" >> /tmp/jk2_start.log
echo "JK2 Server Started." >> /tmp/jk2_start.log
date "+%D %H:%M:%S" >> /tmp/jk2_start.log
echo "JK2 Server crashed, Restarting." >> /tmp/jk2_start.log
sleep 5
end -- This is just my command line

./jk2ded +set dedicated 2 +set vm_game 2 +set ttycon 0 +set com_hunkMegs 128 +set com_zoneMegs 24 +exec server.cfg

It creates a log which lets you know when the server crashed and restarted in /tmp. I'm working on a bit more sophisticated version which will ping the master server and log the stderr so more data can be collected about just WHY the darn thing dies so often. My RtCW server has run for over a month without a single crash--not one.

"Do you expect me to talk?"

"No, Mr. Bond, I expect you to DIE."
MatrixCPA is offline   you may: