don't wait for virus scan to finish (#2536)

Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Daniel Hansson 2024-01-15 19:57:20 +01:00 committed by GitHub
parent c3f1e0db0e
commit 3149aad664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
lib.sh
View File

@ -461,7 +461,16 @@ done
check_running_cronjobs() {
while [ -n "$(pgrep -f nextcloud/cron.php)" ]
do
countdown "Waiting for the Nextcloud cronjob to finish..." "30"
# Check if virus scan is running, could take ages for it to finish...
if ! pgrep -f clamd
then
# If not running, then keep waiting
countdown "Waiting for the Nextcloud cronjob to finish..." "30"
else
# If virus scan is running, then wait a bit longer, and kill it to release cron.php
countdown "Waiting for the Nextcloud cronjob and virusscan to finish..." "120"
pkill -f clamd
fi
done
}