From 3149aad66463cdead32ae2eb9b1f98fc56e7b164 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Mon, 15 Jan 2024 19:57:20 +0100 Subject: [PATCH] don't wait for virus scan to finish (#2536) Signed-off-by: Daniel Hansson --- lib.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib.sh b/lib.sh index 855bcbae..e55e569a 100644 --- a/lib.sh +++ b/lib.sh @@ -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 }