diff options
author | David Walter Seikel | 2016-11-27 23:58:40 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-27 23:58:40 +1000 |
commit | ed0de24e6bc2cac4c20051070710557055b463d0 (patch) | |
tree | 888f55c8f7317f96cc00450f886c9d52ac64e8ef /scripts/backup-sims.sh | |
parent | Fix "only backup people that have logged in since last time", due to OpenSim ... (diff) | |
download | opensim-SC-ed0de24e6bc2cac4c20051070710557055b463d0.zip opensim-SC-ed0de24e6bc2cac4c20051070710557055b463d0.tar.gz opensim-SC-ed0de24e6bc2cac4c20051070710557055b463d0.tar.bz2 opensim-SC-ed0de24e6bc2cac4c20051070710557055b463d0.tar.xz |
Various little backup system fixes.
Diffstat (limited to 'scripts/backup-sims.sh')
-rwxr-xr-x | scripts/backup-sims.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh index a449e41..b14acca 100755 --- a/scripts/backup-sims.sh +++ b/scripts/backup-sims.sh | |||
@@ -3,17 +3,18 @@ | |||
3 | source common.sh | 3 | source common.sh |
4 | getPrgDir | 4 | getPrgDir |
5 | 5 | ||
6 | for i in $(seq 99) | 6 | for i in $(seq -w 1 99) |
7 | do | 7 | do |
8 | j=$(num2name ${i}) | 8 | j=$(num2name ${i}) |
9 | if [ -e "${PRGDIR}/../config/${j}" ] | 9 | if [ -e "${PRGDIR}/../config/${j}" ] |
10 | then | 10 | then |
11 | cd ${PRGDIR}/../config/$j | 11 | pushd ${PRGDIR}/../config/${j} >/dev/null |
12 | # Find out the size of the last backup, base our later sleep on that, but do it now before backup-sim packs it away. | 12 | # Find out the size of the last backup, base our later sleep on that, but do it now before backup-sim packs it away. |
13 | sizeSleep=`sleepPerSize o "$(getSimName ${i})"` | 13 | sizeSleep=`sleepPerSize o "$(getSimName ${i})"` |
14 | ./backup-sim | 14 | ./backup-sim |
15 | # Sleep for a while, so that there is plenty of time to do the backup, | 15 | # Sleep for a while, so that there is plenty of time to do the backup, |
16 | # and we are not keeping the computer very busy if there are lots of sims. | 16 | # and we are not keeping the computer very busy if there are lots of sims. |
17 | sleep ${sizeSleep} | 17 | sleep ${sizeSleep} |
18 | popd > /dev/null | ||
18 | fi | 19 | fi |
19 | done | 20 | done |