#!/bin/sh
LD_LIBRARY_PATH=".:bin:$LD_LIBRARY_PATH"
for (;;)
{
./srcds_i486 $@
$RETVAL=$?
echo "At "`date`" the tf2 server on nemu restarted. We are now checking for updates:" | tee -a reboot.log
cd ../..
./updateserver.sh | tee -a reboot.log
$RETVAL=$?
cd srv/orangebox
if test $RETVAL -eq 0; then
echo "Update check succeeded. Rebooting server." | tee -a reboot.log
else
echo "** WARNING ** Update returned fail. Restarting server, but it might not be up to date!" | tee -a reboot.log
fi
}