From 5540a7970453dde0f771e6db56b9e55e4d0b52e4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 11 Apr 2021 20:50:15 +0200 Subject: [PATCH] monitoring cron: Check changes in /home/$ssh_user/backup for more accuracy and cover the case where stuff are symlinks --- conf/monitor-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/monitor-backup b/conf/monitor-backup index 9010a0f..bd0f5b1 100644 --- a/conf/monitor-backup +++ b/conf/monitor-backup @@ -1,2 +1,2 @@ SHELL=/bin/bash -0 9,20 * * * root : Monitor __SSH_USER__ backup ; ALERT_DELAY="$(yunohost app setting __APP__ alert_delay)"; [[ $(find /home/__SSH_USER__ -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in /home/__SSH_USER__ since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : __SSH_USER__" $(yunohost app setting __APP__ alert_mails)) +0 9,20 * * * root : Monitor __SSH_USER__ backup ; ALERT_DELAY="$(yunohost app setting __APP__ alert_delay)"; [[ $(find /home/__SSH_USER__/backup -follow -mtime -${ALERT_DELAY} -ls | wc -l) > 0 ]] || ( echo "No file has been backuped in /home/__SSH_USER__ since ${ALERT_DELAY} days" | mail -s "[YNH] Backup missing : __SSH_USER__" $(yunohost app setting __APP__ alert_mails))