mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-21 15:06:50 +00:00
Merge pull request #1534 from nextcloud/enh/noid/fix-clamav-daemon-starting-trap
fix Clamav starting trap
This commit is contained in:
commit
17fe0db050
2 changed files with 8 additions and 2 deletions
|
|
@ -472,10 +472,16 @@ fi
|
||||||
|
|
||||||
# Clamav
|
# Clamav
|
||||||
if [ "$CLAMAV_ENABLED" = 'yes' ]; then
|
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..."
|
echo "waiting for clamav to become available..."
|
||||||
|
CLAMAV_COUNT=$((CLAMAV_COUNT + 5))
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
if [ "$CLAMAV_COUNT" -ge 90 ]; then
|
||||||
|
echo "Error: ClamAV was not reachable within 90s. Most likely is your RAM not big enough to let it start correctly."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
|
if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
|
||||||
php /var/www/html/occ app:install files_antivirus
|
php /var/www/html/occ app:install files_antivirus
|
||||||
elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then
|
elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then
|
||||||
|
|
|
||||||
|
|
@ -562,7 +562,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% 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>
|
<script type="text/javascript" src="automatic_reload.js"></script>
|
||||||
{% else %}
|
{% else %}
|
||||||
<script type="text/javascript" src="before-unload.js"></script>
|
<script type="text/javascript" src="before-unload.js"></script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue