allow to adjust the log level globally (watchtower)

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L.
2026-04-17 15:17:17 +02:00
parent d69939f010
commit 95f70d2082

View File

@@ -1,5 +1,9 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
# Check if socket is available and readable
if ! [ -e "/var/run/docker.sock" ]; then
echo "Docker socket is not available. Cannot continue."
@@ -17,7 +21,7 @@ if [ -f /run/.containerenv ]; then
fi
if [ -n "$CONTAINER_TO_UPDATE" ]; then
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
exec /watchtower --cleanup --log-level "$AIO_LOG_LEVEL" --run-once "$CONTAINER_TO_UPDATE"
else
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
exit 1