From 17cc54b85f807d319f6524b12d9be8a9db6657a3 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 2 Mar 2023 21:59:12 +0100 Subject: [PATCH] fix mail backup --- roles/deploy-web/files/scw-backup.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/deploy-web/files/scw-backup.sh b/roles/deploy-web/files/scw-backup.sh index 3c394b9..9726b87 100755 --- a/roles/deploy-web/files/scw-backup.sh +++ b/roles/deploy-web/files/scw-backup.sh @@ -10,14 +10,12 @@ log () { rotate_log() { cat ${LOGFILE_RECENT} >> ${LOGFILE} - backupScw=`echo ${SCW_BUCKET} | rev | cut -d "/" -f 2 | rev` status="OK" if [ $(grep "Errors 0" ${LOGFILE_RECENT} |wc -l) -eq 0 ]; then status="ALERTE FAIL !!!" - fi - cat ${LOGFILE_RECENT} |mail -s "${status} | Backup ${backupScw} `date +%Y-%m-%d`" valczebackup@gmail.com + fi + cat ${LOGFILE_RECENT} |mail -s "${status} | Backup ${SCW_BUCKET} `date +%Y-%m-%d`" valczebackup@gmail.com } - USER=$(whoami) currently_backuping=$(ps -ef | grep duplicity | grep python |grep ${USER} | wc -l)