change crontab on all installations to 5 minutes (#1998)

This commit is contained in:
Daniel Hansson 2021-05-26 21:49:44 +02:00 committed by GitHub
parent 1e72f06fb3
commit 0c263f8af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -954,6 +954,14 @@ then
fi
fi
# Fix crontab every 5 minutes instead of 15
if crontab -u www-data -l | grep -q "\*/15 \* \* \* \* php -f $NCPATH/cron.php"
then
crontab -u www-data -l | grep -v "php -f $NCPATH/cron.php" | crontab -u www-data -
crontab -u www-data -l | { cat; echo "*/5 * * * * php -f $NCPATH/cron.php > /dev/null 2>&1"; } | crontab -u www-data -
print_text_in_color "$ICyan" "Nextcloud crontab updated to run every 5 minutes."
fi
# Change owner of $BACKUP folder to root
chown -R root:root "$BACKUP"