mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 02:18:51 +00:00
Improve FTL startup error handling by capturing and displaying wait output
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -80,10 +80,11 @@ start() {
|
|||||||
|
|
||||||
# Wait until the FTL log contains the "FTL started" message before continuing
|
# Wait until the FTL log contains the "FTL started" message before continuing
|
||||||
# exit if we do not find it
|
# 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
|
if [ $? -ne 0 ]; then
|
||||||
echo " [✗] FTL did not start within ${FTL_START_TIMEOUT} seconds - stopping container"
|
echo " [✗] ${wait_output}"
|
||||||
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 " [✗] FTL did not start, stopping container"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user