fix Clamav starting trap

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-12-16 12:36:51 +01:00
parent 0b961c9dfc
commit 08aa2eece3
2 changed files with 8 additions and 2 deletions

View file

@ -463,10 +463,16 @@ fi
# Clamav
if [ "$CLAMAV_ENABLED" = 'yes' ]; then
while ! nc -z "$CLAMAV_HOST" 3310; do
CLAMAV_COUNT=0
while ! nc -z "$CLAMAV_HOST" 3310 && [ "$CLAMAV_COUNT" -lt 90 ]; do
echo "waiting for clamav to become available..."
CLAMAV_COUNT=$((CLAMAV_COUNT + 5))
sleep 5
done
if [ "$CLAMAV_COUNT" -ge 90 ]; then
echo "Error: ClamAV was not reachable within 90s."
exit 1
fi
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

View file

@ -562,7 +562,7 @@
{% endif %}
{% endif %}
{% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true %}
{% if isAnyRestarting == false and (isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true) %}
<script type="text/javascript" src="automatic_reload.js"></script>
{% else %}
<script type="text/javascript" src="before-unload.js"></script>