[ClamAV] Try to prevent update collisions
This commit is contained in:
parent
be4099182b
commit
1e4aa212ea
@ -40,16 +40,15 @@ BACKGROUND_TASKS=()
|
||||
|
||||
(
|
||||
while true; do
|
||||
sleep 1m
|
||||
freshclam
|
||||
sleep 1h
|
||||
sleep 12600
|
||||
done
|
||||
) &
|
||||
BACKGROUND_TASKS+=($!)
|
||||
|
||||
(
|
||||
while true; do
|
||||
sleep 2m
|
||||
sleep 10m
|
||||
SANE_MIRRORS="$(dig +ignore +short rsync.sanesecurity.net)"
|
||||
for sane_mirror in ${SANE_MIRRORS}; do
|
||||
CE=
|
||||
@ -69,11 +68,15 @@ while true; do
|
||||
CE=$?
|
||||
chmod 755 /var/lib/clamav/
|
||||
if [ ${CE} -eq 0 ]; then
|
||||
echo RELOAD | nc localhost 3310
|
||||
while [ ! -z "$(pidof freshclam)" ]; do
|
||||
echo "Freshclam is active, waiting..."
|
||||
sleep 5
|
||||
done
|
||||
echo RELOAD | nc clamd-mailcow 3310
|
||||
break
|
||||
fi
|
||||
done
|
||||
sleep 30h
|
||||
sleep 12h
|
||||
done
|
||||
) &
|
||||
BACKGROUND_TASKS+=($!)
|
||||
|
@ -52,7 +52,7 @@ services:
|
||||
- redis
|
||||
|
||||
clamd-mailcow:
|
||||
image: mailcow/clamd:1.30
|
||||
image: mailcow/clamd:1.31
|
||||
build: ./data/Dockerfiles/clamd
|
||||
restart: always
|
||||
dns:
|
||||
|
Loading…
Reference in New Issue
Block a user