From 2c0461d223e330aad6f6170409d50f0833598101 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 Apr 2026 15:17:14 +0200 Subject: [PATCH] allow to adjust the log level globally (domaincheck) Signed-off-by: Simon L. --- Containers/domaincheck/start.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Containers/domaincheck/start.sh b/Containers/domaincheck/start.sh index 06c0aef2..7765b97b 100644 --- a/Containers/domaincheck/start.sh +++ b/Containers/domaincheck/start.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + if [ -z "$INSTANCE_ID" ]; then echo "You need to provide an instance id." exit 1 @@ -14,6 +18,20 @@ fi CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)" echo "$CONF_FILE" > /etc/lighttpd/lighttpd.conf +# shellcheck disable=SC2235 +if ([ "$AIO_LOG_LEVEL" = 'debug' ] || [ "$AIO_LOG_LEVEL" = 'info' ]) && ! grep -q debug.log-request-handling /etc/lighttpd/lighttpd.conf; then + cat << CONF_FILE >> /etc/lighttpd/lighttpd.conf +debug.log-request-handling = "enable" +CONF_FILE +fi + +if [ "$AIO_LOG_LEVEL" = 'debug' ] && ! grep -q debug.log-request-header /etc/lighttpd/lighttpd.conf; then + cat << CONF_FILE >> /etc/lighttpd/lighttpd.conf +debug.log-request-header = "enable" +debug.log-response-header = "enable" +CONF_FILE +fi + # Check config file lighttpd -tt -f /etc/lighttpd/lighttpd.conf