clamav: adjust a few more things

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-03-06 16:58:25 +01:00
parent aa452b4613
commit a661b488c3
4 changed files with 9 additions and 5 deletions

View file

@ -3,7 +3,7 @@ FROM alpine:3.21.3
RUN set -ex; \ RUN set -ex; \
apk upgrade --no-cache -a; \ apk upgrade --no-cache -a; \
apk add --no-cache tzdata clamav supervisor; \ apk add --no-cache tzdata clamav supervisor bash; \
mkdir -p /run/clamav /var/log/supervisord /var/run/supervisord; \ mkdir -p /run/clamav /var/log/supervisord /var/run/supervisord; \
chmod 777 -R /run/clamav /var/log/clamav /var/log/supervisord /var/run/supervisord; \ chmod 777 -R /run/clamav /var/log/clamav /var/log/supervisord /var/run/supervisord; \
sed -i "s|#\?MaxDirectoryRecursion.*|MaxDirectoryRecursion 30|g" /etc/clamav/clamd.conf; \ sed -i "s|#\?MaxDirectoryRecursion.*|MaxDirectoryRecursion 30|g" /etc/clamav/clamd.conf; \

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/bin/bash
if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then
echo "ERROR: Unable to contact server" echo "ERROR: Unable to contact server"

View file

@ -1,5 +1,7 @@
#!/usr/bin/env sh #!/bin/bash
sed "s|aio-placeholder|$MAX_SIZE|" /etc/clamav/clamd.conf > /tmp/clamd.conf sed "s|aio-placeholder|$MAX_SIZE|" /etc/clamav/clamd.conf > /tmp/clamd.conf
echo "Clamav started"
exec "$@" exec "$@"

View file

@ -9,13 +9,15 @@ logfile_backups=10
loglevel=error loglevel=error
[program:freshclam] [program:freshclam]
stdout_logfile=NONE stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
command=freshclam --foreground --stdout --daemon command=freshclam --foreground --stdout --daemon
[program:clamd] [program:clamd]
stdout_logfile=NONE stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
command=clamd --foreground --config-file=/tmp/clamd.conf command=clamd --foreground --config-file=/tmp/clamd.conf