From ea098a4d1aa4d10b30e2c108f3ccf12d1f198ddc Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 16 Mar 2022 22:28:17 +0100 Subject: [PATCH] wait for clamav to become available Signed-off-by: szaimen --- Containers/nextcloud/entrypoint.sh | 4 ++++ php/templates/containers.twig | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 1353106b..9508cc09 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -306,6 +306,10 @@ php /var/www/html/occ config:app:set spreed signaling_servers --value="$SIGNALIN # Clamav if [ "$CLAMAV_ENABLED" = 'yes' ]; then + while ! nc -z "$CLAMAV_HOST" 3310; do + echo "waiting for clamav to become available..." + sleep 5 + done if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then php /var/www/html/occ app:install files_antivirus elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 1c1c1c0c..2526e7b0 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -31,7 +31,7 @@ {% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %} {% set isAnyRunning = true %} {% endif %} - {% if container.GetIdentifier() in ['nextcloud-aio-redis', 'nextcloud-aio-database', 'nextcloud-aio-nextcloud', 'nextcloud-aio-apache'] and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %} + {% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %} {% set isAnyRestarting = true %} {% endif %} {% if container.GetIdentifier() == 'nextcloud-aio-watchtower' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}