From b4fdb5524411dc51ba60713387d87f532f1d6d02 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 27 Nov 2016 23:53:51 +1000 Subject: Sleep between backups based on size of the backup file. Poor mans "wait for it to finish" guess. --- scripts/backup-sims.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/backup-sims.sh') diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh index 2d174b1..a449e41 100755 --- a/scripts/backup-sims.sh +++ b/scripts/backup-sims.sh @@ -9,9 +9,11 @@ do if [ -e "${PRGDIR}/../config/${j}" ] then cd ${PRGDIR}/../config/$j + # Find out the size of the last backup, base our later sleep on that, but do it now before backup-sim packs it away. + sizeSleep=`sleepPerSize o "$(getSimName ${i})"` ./backup-sim # Sleep for a while, 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 200 + sleep ${sizeSleep} fi done -- cgit v1.1