Skip to content

Commit

Permalink
Merge pull request #1234 from pi-hole/updatechecktiming
Browse files Browse the repository at this point in the history
Ensure FTL is running before attempting to run functions/lines that require DNS resolution to be working
  • Loading branch information
PromoFaux authored Nov 9, 2022
2 parents 1f69a1a + f73c92d commit 41aa699
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/s6/debian-root/etc/s6-overlay/s6-rc.d/_gravityonboot/up

This file was deleted.

2 changes: 2 additions & 0 deletions src/s6/debian-root/etc/s6-overlay/s6-rc.d/_postFTL/up
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/execlineb
background { bash -e /usr/local/bin/_postFTL.sh }

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# This script contains function calls and lines that may rely on pihole-FTL to be running, it is run as part of a oneshot service on container startup

if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
Expand All @@ -20,4 +21,13 @@ if [ -z "$SKIPGRAVITYONBOOT" ] || [ ! -f "${gravityDBfile}" ]; then
pihole -g
else
echo " Skipping Gravity Database Update."
fi
fi

# Run update checker to check for newer container, and display version output
echo ""
pihole updatechecker
pihole -v

DOCKER_TAG=$(cat /pihole.docker.tag)
echo " Container tag is: ${DOCKER_TAG}"
echo ""
3 changes: 0 additions & 3 deletions src/s6/debian-root/usr/local/bin/_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ test_configs
echo " [i] Docker start setup complete"
echo ""

pihole -v

echo " Container tag is: ${PIHOLE_DOCKER_TAG}"
echo ""
echo " [i] pihole-FTL ($FTL_CMD) will be started as ${DNSMASQ_USER}"
echo ""
3 changes: 0 additions & 3 deletions src/s6/debian-root/usr/local/bin/bash_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ ensure_basic_configuration() {
chown pihole:root "${PI_HOLE_BIN_DIR}/pihole"

set -e
# Update version numbers
pihole updatechecker
pihole updatechecker remote
# Re-write all of the setupVars to ensure required ones are present (like QUERY_LOGGING)

# If the setup variable file exists,
Expand Down

0 comments on commit 41aa699

Please sign in to comment.