public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[ClamAV] Try to prevent update collisions
1e4aa212
data/Dockerfiles/clamd/clamd.sh | 13 ++++++++-----
docker-compose.yml | 2 +-
2 files changed, 9 insertions(+), 6 deletions(-)
Diff
diff --git a/data/Dockerfiles/clamd/clamd.sh b/data/Dockerfiles/clamd/clamd.sh
index 20153659..a8ceb5f6 100755
--- a/data/Dockerfiles/clamd/clamd.sh
+++ b/data/Dockerfiles/clamd/clamd.sh
@@ -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+=($!)
diff --git a/docker-compose.yml b/docker-compose.yml
index a459a763..3eee7857 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -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: