From f01a5841b96de6f81d05f8e92b4fd308d64b328b Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 7 Mar 2023 09:29:04 +0100 Subject: [PATCH] only send update notifications on saturdays Signed-off-by: Simon L --- Containers/mastercontainer/cron.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Containers/mastercontainer/cron.sh b/Containers/mastercontainer/cron.sh index f5de8a50..03e5a724 100644 --- a/Containers/mastercontainer/cron.sh +++ b/Containers/mastercontainer/cron.sh @@ -38,8 +38,10 @@ while true; do # Make sure to delete the lock file always rm -f "/mnt/docker-aio-config/data/daily_backup_running" - # Check for updates and send notification if yes - sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php + # Check for updates and send notification if yes on saturdays + if [ "$(date +%u)" = 6 ]; then + sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php + fi # Check if AIO is outdated sudo -u www-data php /var/www/docker-aio/php/src/Cron/OutdatedNotification.php