David wrote:

> No biggy, but a "results" message would make it easier to do this at a
glance, which would be great given the number of different Steam-powered
games and servers we're supporting.

Our servers run as userjobs symlinked to a single root install. Because of
this we cant use the autoupdate.
Heres the (quick and dirty) updatescript we run as a root cronjob every
night. (Valves updatetimes are perfect for us Europeans.)

---- cut ----

#!/bin/sh
#
# Stop servers, run & log steam update (Servers are restarted by user job:
chk_srv.sh)
# This is a root cronjob check crontab for details.
#
# By Lazy. Edit: 16MAR2004
#
/home/css/css1 stop
/home/css/css2 stop
/home/hl2mp/hl2mp1 stop

cd /usr/local/games/hl2

echo >> /root/steam_logs/source_update.txt
echo -------------------- >> /root/steam_logs/source_update.txt
echo - Start HL2 update - >> /root/steam_logs/source_update.txt
echo -------------------- >> /root/steam_logs/source_update.txt
echo Running CSSRC update... >> /root/steam_logs/source_update.txt

# Loop CS Source update
COUNTER=0
UPDOK=""
while [ "$UPDOK" = "" ]; do
    ./steam -command update -game 'Counter-Strike Source' -username xxx
-password xxx -dir /usr/local/games/hl2 > /root/steam_logs/CSSRC_upd.txt
    UPDOK=`grep 'HLDS installation up to date'
/root/steam_logs/CSSRC_upd.txt`
    let COUNTER+=1
done

echo >> /root/steam_logs/source_update.txt
echo CS:SOURCE update finished after $COUNTER attempts >>
/root/steam_logs/source_update.txt
echo >> /root/steam_logs/source_update.txt
echo >> /root/steam_logs/source_update.txt
echo Running HL2 Multiplayer update... >> /root/steam_logs/source_update.txt

# Loop HL2 MP update
COUNTER=0
UPDOK=""
while [ "$UPDOK" = "" ]; do
    ./steam -command update -game 'hl2mp' -username xxx -password xxx -dir
/usr/local/games/hl2 > /root/steam_logs/HL2MP_upd.txt
    UPDOK=`grep 'HLDS installation up to date'
/root/steam_logs/HL2MP_upd.txt`
    let COUNTER+=1
done

echo >> /root/steam_logs/source_update.txt
echo HL2 Multiplayer update finished after $COUNTER attempts >>
/root/steam_logs/source_update.txt
echo >> /root/steam_logs/source_update.txt

echo ===================== >> /root/steam_logs/source_update.txt
echo = Finished updating = >> /root/steam_logs/source_update.txt
echo ===================== >> /root/steam_logs/source_update.txt
echo >> /root/steam_logs/source_update.txt
echo >> /root/steam_logs/source_update.txt

---- cut ----

In addition to this script we have user cronjobs checking and (if needed)
restarting the servers every 10 minutes.
The script will (as you can see) produce a single resultsfile + an output of
the last update for each server. If steam "bails out" it will just try once
more.

Feel free to use, mv /dev/null, whatever :)



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to