From df10a411652d470ae5a8c96a6b76fb9a2abecb01 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 26 Oct 2025 12:15:43 +0000 Subject: [PATCH] Improve FTL startup error handling by capturing and displaying wait output Signed-off-by: Adam Warner --- src/start.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/start.sh b/src/start.sh index 434722c..3f5fbc1 100644 --- a/src/start.sh +++ b/src/start.sh @@ -80,10 +80,11 @@ start() { # Wait until the FTL log contains the "FTL started" message before continuing # exit if we do not find it - pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log "${FTL_START_TIMEOUT}" 0 > /dev/null + local wait_output + wait_output=$(pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log "${FTL_START_TIMEOUT}" 0) if [ $? -ne 0 ]; then - echo " [✗] FTL did not start within ${FTL_START_TIMEOUT} seconds - stopping container" - echo " [i] If this continues to happen, consider increasing the timeout by setting the FTL_START_TIMEOUT environment variable to a higher value (in seconds)." + echo " [✗] ${wait_output}" + echo " [✗] FTL did not start, stopping container" exit 1 fi