summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-03-29 11:19:10 +0100
committerErich Eckner <git@eckner.net>2019-03-29 11:19:10 +0100
commit16209bb1ddda9a84da63ee9fb17eea6701954655 (patch)
treeee14c337549a9bace70ae0a9cce55a43bbf22f32
parent314ad8d94c5ff33fd2eadb1027748550be0e7e4f (diff)
downloadhardlinkedBackups-16209bb1ddda9a84da63ee9fb17eea6701954655.tar.xz
last-backups.in: print whether backup is still running
-rwxr-xr-xlast-backups.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/last-backups.in b/last-backups.in
index a8ee5f2..9777392 100755
--- a/last-backups.in
+++ b/last-backups.in
@@ -58,19 +58,24 @@ 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\$##"))"
+ if [ -f "/tmp/${backupID}.pid" ] && pgrep -x backup | grep -qxF "$(cat "/tmp/${backupID}.pid")"; then
+ laeuft='_laeuft'
+ else
+ laeuft=''
+ fi
if [ ! -d "${dest}/${lbu}" ]
then
- veraltet[${#veraltet[@]}]="LEER!"
+ veraltet[${#veraltet[@]}]="LEER!${laeuft}"
elif [ ${delta} -gt ${outdatedLimit} ] && \
! printf '%s\n' "${seldomBackups[@]}" | \
grep -qxF "${backupID}"
then
- veraltet[${#veraltet[@]}]="VERALTET!"
+ veraltet[${#veraltet[@]}]="VERALTET!${laeuft}"
elif [ ${delta} -gt ${outdatedSeldomLimit} ]
then
- veraltet[${#veraltet[@]}]="VERALTET!"
+ veraltet[${#veraltet[@]}]="VERALTET!${laeuft}"
else
- veraltet[${#veraltet[@]}]=""
+ veraltet[${#veraltet[@]}]="${laeuft}"
fi
daten[${#daten[@]}]="${lbu}"
done