From cd86addef2027915ccc4b200acf86b0feff38beb Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Fri, 12 Nov 2021 14:27:05 +0100 Subject: [PATCH] backup status: add handling for backup exitcode --- storage_helper.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/storage_helper.sh b/storage_helper.sh index ca19827..9b24df5 100755 --- a/storage_helper.sh +++ b/storage_helper.sh @@ -31,6 +31,7 @@ # 2021-06-18 hahn store backup status in status files ... do not grep frpom logs # 2021-06-21 hahn use single status file; added backup size # 2021-01-22 hahn show inactive backups in status page; colored lines by status +# 2021-11-12 hahn backup status: add handling for backup exitcode # ====================================================================== # ---------------------------------------------------------------------- @@ -324,11 +325,16 @@ test $bIsInactive -eq 1 && sStatusRun="$(color disabled)D" # check values - if [ $iend -gt 0 -a $iagehours -gt $iMaxbackupAge -a $bIsInactive -eq 0 ]; then + if [ $iLastStatus -gt 0 ]; then ierrors=$ierrors+1 sStatusRun="$(color error)E" + else + if [ $iend -gt 0 -a $iagehours -gt $iMaxbackupAge -a $bIsInactive -eq 0 ]; then + ierrors=$ierrors+1 + sStatusRun="$(color error)E" + fi fi - + if [ $iend -eq 0 ]; then tstart="-" tend="-" -- GitLab