diff options
Diffstat (limited to 'backup-progress.in')
-rwxr-xr-x | backup-progress.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/backup-progress.in b/backup-progress.in index 90492fb..4e67f92 100755 --- a/backup-progress.in +++ b/backup-progress.in @@ -26,13 +26,19 @@ for backupID in "${!backups[@]}"; do | tail -n1 ) last_size=$( - du -sb "${dir}/${last}" \ + timeout ${du_timeout} du -sb "${dir}/${last}" \ | awk '{print $1}' ) + if [ -z "${last_size}" ]; then + last_size='4096' + fi current_size=$( - du -sb "${dir}/aktuell" \ + timeout ${du_timeout} du -sb "${dir}/aktuell" \ | awk '{print $1}' ) + if [ -z "${current_size}" ]; then + current_size='0' + fi size="${current_size}" decimal='' for unit in '' k M G T P Y; do |