From 930ced0b96e4b0ac32eadf1037c1c3e78e3988ec Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 Apr 2016 15:25:00 +0200 Subject: lastBackups warnt nun auch bei leeren Backups --- lastBackups | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lastBackups b/lastBackups index 7a03c11..83fcbed 100755 --- a/lastBackups +++ b/lastBackups @@ -28,7 +28,11 @@ do [ "${lbu}" == "" ] && lbu="2000_01_01" delta=$[$(date +%s) - $(date -d $(echo ${lbu} | sed "s/_//g") +%s)] namen[${#namen[@]}]="$(basename $(echo ${dest} | sed "s#/\(${recognSubdirRegex}\)\$#_\1#" | sed "s#/rsync\$##; s#/duplicity\$##"))" - [ ${delta} -gt ${outdatedLimit} ] && veraltet[${#veraltet[@]}]="VERALTET!" || veraltet[${#veraltet[@]}]="" + [ ! "$(ls -A ${dest}/${lbu})" ] && + veraltet[${#veraltet[@]}]="LEER!" || + [ ${delta} -gt ${outdatedLimit} ] && \ + veraltet[${#veraltet[@]}]="VERALTET!" || \ + veraltet[${#veraltet[@]}]="" daten[${#daten[@]}]="${lbu}" done -- cgit v1.2.3-70-g09d2