Add ressources monitoring and fix backup status check

This commit is contained in:
Paul-Henri Froidmont 2018-02-14 17:10:30 +01:00
parent 76cb401c53
commit 27c912a613
2 changed files with 8 additions and 4 deletions

View file

@ -6,7 +6,7 @@ ONGOING_FILE="/backups/backup-ongoing"
if [ -f "$ONGOING_FILE" ]
then
if test `find "$ONGOING_FILE" -mmin +1`
if test `find "$ONGOING_FILE" -mmin +180`
then
LAST_MODIFICATION_HOURS=`expr "$(($(date +%s) - $(date +%s -r $ONGOING_FILE)))" / 3600`
echo "Backup not finished after more than $LAST_MODIFICATION_HOURS hours"