Skip to content

Commit

Permalink
Don't return from the Stop` function early (causes code 143). Shut do…
Browse files Browse the repository at this point in the history
…wn FTL with signal 15 and assume it's exit code is 0 (safe assumption)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
  • Loading branch information
PromoFaux committed Oct 8, 2024
1 parent f9b6999 commit b5ab72e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ stop() {
# Ensure pihole-FTL shuts down cleanly on SIGTERM/SIGINT
ftl_pid=$(pgrep pihole-FTL)

killall --signal 15 pihole-FTL
killall --signal 15 pihole-FTL

# Wait for pihole-FTL to exit
while test -d /proc/"${ftl_pid}"; do
sleep 0.5
done
# Return from this function, it will be called again once FTL finishes
return

# Assume FTL exited clealy at this point

Check failure on line 130 in src/start.sh

View workflow job for this annotation

GitHub Actions / spell-check

clealy ==> clearly, cleanly
FTL_EXIT_CODE=0
fi

# Wait for a few seconds to allow the FTL log tail to catch up before exiting the container
Expand Down

0 comments on commit b5ab72e

Please sign in to comment.