From 07bd520b7754a554f34e898b1f849e46e834144a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 Apr 2026 15:17:13 +0200 Subject: [PATCH] allow to adjust the log level globally (clamav) Signed-off-by: Simon L. --- Containers/clamav/healthcheck.sh | 4 ++++ Containers/clamav/start.sh | 4 ++++ Containers/clamav/supervisord.conf | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Containers/clamav/healthcheck.sh b/Containers/clamav/healthcheck.sh index fe8b5daa..20e4db21 100644 --- a/Containers/clamav/healthcheck.sh +++ b/Containers/clamav/healthcheck.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then echo "ERROR: Unable to contact server" exit 1 diff --git a/Containers/clamav/start.sh b/Containers/clamav/start.sh index 609120c1..01cb3171 100644 --- a/Containers/clamav/start.sh +++ b/Containers/clamav/start.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + # Print out clamav version for compliance reasons clamscan --version diff --git a/Containers/clamav/supervisord.conf b/Containers/clamav/supervisord.conf index 88933ab2..1d7685b1 100644 --- a/Containers/clamav/supervisord.conf +++ b/Containers/clamav/supervisord.conf @@ -5,7 +5,7 @@ pidfile=/var/run/supervisord/supervisord.pid childlogdir=/var/log/supervisord/ logfile_maxbytes=50MB logfile_backups=10 -loglevel=error +loglevel=%(ENV_AIO_LOG_LEVEL)s [program:freshclam] stdout_logfile=/dev/stdout