diff options
author | David Walter Seikel | 2011-11-28 04:53:09 +1000 |
---|---|---|
committer | David Walter Seikel | 2011-11-28 04:53:09 +1000 |
commit | 554583496a2fdd3b9399c73a7fc526f99956e5bc (patch) | |
tree | ac2bb5d813f39b239179560855a15eceb4cf8682 /backup-sims.sh | |
parent | No need to deal with ownership and perms, the install script does that now. (diff) | |
download | IGnoble-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-x | backup-sims.sh | 16 |
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 | |||
3 | OSPATH="/opt/opensim" | ||
4 | |||
5 | for i in $(seq 99) | ||
6 | do | ||
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 | ||
16 | done | ||