Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ start() {
sleep 0.5
done

# Wait until the FTL log contains the "FTL started" message before continuing
while ! grep -q '########## FTL started' /var/log/pihole/FTL.log; do
sleep 0.5
done
# Wait until the FTL log contains the "FTL started" message before continuing, timeout after 10 seconds
# exit if we do not find it
pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log 10 "0 > /dev/null"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the PR for the shutdown test - you comment that we check for up to 60 secodns to give slow RISCV devices a chance to start up. Perhaps we should wait 60 seconds here.

@yubiuser yubiuser Sep 28, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is: Within the start.sh, pihole-FTL wait-for will only wait for the log line to appear, which is triggered by the capsh --user="${DNSMASQ_USER}" --keep=1 -- -c "/usr/bin/pihole-FTL $FTL_CMD >/dev/null" & line just above. Not much time should be in between.

The other PR watches the container from the outside before it kills the container. There are other (maintenance) tasks before FTL will even be invoked, e.g. running gravity. Therefore I gave it more time.

if [ $? -ne 0 ]; then
echo " [✗] FTL did not start - stopping container"
exit 1
fi

pihole updatechecker
local versionsOutput
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_pihole_ftl_architecture(docker):


# Wait 5 seconds for startup, then kill the start.sh script
# Finally, grep the FTL log to see if it has been shut down cleanly
# Finally, check the FTL log to see if it has been shut down cleanly
def test_pihole_ftl_clean_shutdown(docker):
func = docker.run(
"""
Expand Down