diff options
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 | ||
