mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 18:38:46 +00:00
Increase default FTL startup timeout to 30 seconds, but also make it configurable via environment variable so that users can tweak to their liking if 30 seconds is still not enough...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
10
src/start.sh
10
src/start.sh
@@ -75,11 +75,15 @@ start() {
|
|||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
# Wait until the FTL log contains the "FTL started" message before continuing, timeout after 10 seconds
|
# Set FTL startup timeout from environment variable, default to 30 seconds
|
||||||
|
local FTL_START_TIMEOUT="${FTL_START_TIMEOUT:-30}"
|
||||||
|
|
||||||
|
# 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 10 0 > /dev/null
|
pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log "${FTL_START_TIMEOUT}" 0 > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo " [✗] FTL did not start - stopping container"
|
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)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user