From 554583496a2fdd3b9399c73a7fc526f99956e5bc Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Nov 2011 04:53:09 +1000 Subject: Backup sim regularly. Rest don't work, screen would be better even if it did work. New scripts for stopping the sim, backing up the sim, and showing the console. Monit script works now. --- backup-sims.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 backup-sims.sh (limited to 'backup-sims.sh') diff --git a/backup-sims.sh b/backup-sims.sh new file mode 100755 index 0000000..775ebbe --- /dev/null +++ b/backup-sims.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +OSPATH="/opt/opensim" + +for i in $(seq 99) +do + j=$(printf "sim%02d" $i) + if [ -e "$OSPATH/config/$j" ] + then + cd $OSPATH/config/$j + ./backup-sim + # sleep for three minutes, so that there is plenty of time to do the backup, + # and we are not keeping the computer very busy if there are lots of sims. + sleep(180) + fi +done -- cgit v1.1