From cc70724a1f33052331d3642c50f981cf2d8effb0 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 12 Apr 2023 13:53:14 +0200 Subject: [PATCH] finetune notifications --- backup.sh | 3 +-- localdump.sh | 1 + transfer.sh | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index ac5c8b1..c9ddb85 100755 --- a/backup.sh +++ b/backup.sh @@ -214,7 +214,6 @@ EOFbackupinfo # "${DIR_SELF}"/transfer.sh $JOBDEF_TYPE "$JOBDEF_AUTO" 2>&1 | tee -a "$JOB_LOGFILE" "${DIR_SELF}"/transfer.sh $JOBDEF_TYPE "$JOBDEF_AUTO" 2>&1 rcTransfer=$? - test $rcTransfer -gt 0 && j_notify "Transfer Dirs" "rc=$rcTransfer" $rcTransfer else echo | tee -a "$JOB_LOGFILE" @@ -263,7 +262,7 @@ EOFbackupinfo # -------------------------------------------------------------------------------- - j_notify "Done" "Backup was finished. rc=$rcBackup" $rcBackup + j_notify "Done" "Backup was finished. rc=$rcBackup. See log for details: $JOB_LOGFILE" $rcBackup exit $rcBackup diff --git a/localdump.sh b/localdump.sh index a9f20d1..f9d1b11 100755 --- a/localdump.sh +++ b/localdump.sh @@ -357,6 +357,7 @@ _j_runHooks "200-before-db-service" . $BACKUP_SCRIPT $mode + test $rc -gt 0 && j_notify "db ${SERVICENAME}" "$BACKUP_SCRIPT $mode was finished with rc=$rc" $rc _j_runHooks "230-after-db-service" "$rc" # ----- post jobs: cleanup diff --git a/transfer.sh b/transfer.sh index 1d4f46d..fed5c42 100755 --- a/transfer.sh +++ b/transfer.sh @@ -406,6 +406,8 @@ function setAction(){ echo t_rcCheckBackup $myrc "${BACKUP_DIR}" + test $myrc -ne 0 && j_notify "Dir ${BACKUP_DIR}" "Backup for ${BACKUP_DIR} failed with rc=$myrc. See log for details: $JOB_LOGFILE" 1 + _j_runHooks "320-after-folder-transfer" "$myrc" fi -- GitLab