aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/backup-sims.sh
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-11-28 04:53:09 +1000
committerDavid Walter Seikel2011-11-28 04:53:09 +1000
commit554583496a2fdd3b9399c73a7fc526f99956e5bc (patch)
treeac2bb5d813f39b239179560855a15eceb4cf8682 /backup-sims.sh
parentNo need to deal with ownership and perms, the install script does that now. (diff)
downloadIGnoble-554583496a2fdd3b9399c73a7fc526f99956e5bc.zip
IGnoble-554583496a2fdd3b9399c73a7fc526f99956e5bc.tar.gz
IGnoble-554583496a2fdd3b9399c73a7fc526f99956e5bc.tar.bz2
IGnoble-554583496a2fdd3b9399c73a7fc526f99956e5bc.tar.xz
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.
Diffstat (limited to 'backup-sims.sh')
-rwxr-xr-xbackup-sims.sh16
1 files changed, 16 insertions, 0 deletions
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 @@
1#!/bin/bash
2
3OSPATH="/opt/opensim"
4
5for i in $(seq 99)
6do
7 j=$(printf "sim%02d" $i)
8 if [ -e "$OSPATH/config/$j" ]
9 then
10 cd $OSPATH/config/$j
11 ./backup-sim
12 # sleep for three minutes, so that there is plenty of time to do the backup,
13 # and we are not keeping the computer very busy if there are lots of sims.
14 sleep(180)
15 fi
16done