fix mail backup
This commit is contained in:
parent
2b63ec3527
commit
17cc54b85f
@ -10,14 +10,12 @@ log () {
|
|||||||
|
|
||||||
rotate_log() {
|
rotate_log() {
|
||||||
cat ${LOGFILE_RECENT} >> ${LOGFILE}
|
cat ${LOGFILE_RECENT} >> ${LOGFILE}
|
||||||
backupScw=`echo ${SCW_BUCKET} | rev | cut -d "/" -f 2 | rev`
|
|
||||||
status="OK"
|
status="OK"
|
||||||
if [ $(grep "Errors 0" ${LOGFILE_RECENT} |wc -l) -eq 0 ]; then
|
if [ $(grep "Errors 0" ${LOGFILE_RECENT} |wc -l) -eq 0 ]; then
|
||||||
status="ALERTE FAIL !!!"
|
status="ALERTE FAIL !!!"
|
||||||
fi
|
fi
|
||||||
cat ${LOGFILE_RECENT} |mail -s "${status} | Backup ${backupScw} `date +%Y-%m-%d`" valczebackup@gmail.com
|
cat ${LOGFILE_RECENT} |mail -s "${status} | Backup ${SCW_BUCKET} `date +%Y-%m-%d`" valczebackup@gmail.com
|
||||||
}
|
}
|
||||||
|
|
||||||
USER=$(whoami)
|
USER=$(whoami)
|
||||||
currently_backuping=$(ps -ef | grep duplicity | grep python |grep ${USER} | wc -l)
|
currently_backuping=$(ps -ef | grep duplicity | grep python |grep ${USER} | wc -l)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user