Thread: Utility Linux Admining
View Single Post
  #11  
Old September 10th, 2006, 10:00 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

PRE hosting script
------------------

GAME="Armageddon"
DIR="/home/dom3/dominions3/savedgames/"$GAME
WEB="/home/dom3/public_html/games/"$GAME

# make backups
#maybe later I will make it rotating backups
zip -9 $GAME.zip $DIR/*

# blank the log file since it grows by about 5 meg each turn
# this way Im only logging one turn at a time
cp /dev/null $DIR/$GAME.log

# update the viewable copies of the shell files
cp /home/dom3/dominions3/$GAME.sh $WEB/$GAME_sh.txt
cp $DIR/pre_$GAME.sh $WEB/pre_$GAME_sh.txt
cp post_$GAME.sh $WEB/post_$GAME_sh.txt

# mark the time and load at the beginning of hosting
echo pre >>$DIR/system_load.txt
uptime >>$DIR/system_load.txt
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote