Skip to content

Commit 41aa699

Browse files
authoredNov 9, 2022
Merge pull request #1234 from pi-hole/updatechecktiming
Ensure FTL is running before attempting to run functions/lines that require DNS resolution to be working
2 parents 1f69a1a + f73c92d commit 41aa699

File tree

10 files changed

+13
-10
lines changed

10 files changed

+13
-10
lines changed
 

Diff for: ‎src/s6/debian-root/etc/s6-overlay/s6-rc.d/_gravityonboot/up

-2
This file was deleted.
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/command/execlineb
2+
background { bash -e /usr/local/bin/_postFTL.sh }

Diff for: ‎src/s6/debian-root/etc/s6-overlay/s6-rc.d/_startup/dependencies

-1
This file was deleted.

Diff for: ‎src/s6/debian-root/usr/local/bin/_gravityonboot.sh renamed to ‎src/s6/debian-root/usr/local/bin/_postFTL.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# 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
23

34
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
45
set -x ;
@@ -20,4 +21,13 @@ if [ -z "$SKIPGRAVITYONBOOT" ] || [ ! -f "${gravityDBfile}" ]; then
2021
pihole -g
2122
else
2223
echo " Skipping Gravity Database Update."
23-
fi
24+
fi
25+
26+
# Run update checker to check for newer container, and display version output
27+
echo ""
28+
pihole updatechecker
29+
pihole -v
30+
31+
DOCKER_TAG=$(cat /pihole.docker.tag)
32+
echo " Container tag is: ${DOCKER_TAG}"
33+
echo ""

Diff for: ‎src/s6/debian-root/usr/local/bin/_startup.sh

-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ test_configs
6969
echo " [i] Docker start setup complete"
7070
echo ""
7171

72-
pihole -v
7372

74-
echo " Container tag is: ${PIHOLE_DOCKER_TAG}"
75-
echo ""
7673
echo " [i] pihole-FTL ($FTL_CMD) will be started as ${DNSMASQ_USER}"
7774
echo ""

Diff for: ‎src/s6/debian-root/usr/local/bin/bash_functions.sh

-3
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ ensure_basic_configuration() {
100100
chown pihole:root "${PI_HOLE_BIN_DIR}/pihole"
101101

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

108105
# If the setup variable file exists,

0 commit comments

Comments
 (0)
Please sign in to comment.