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