mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-24 12:28:56 +00:00
@@ -104,12 +104,10 @@ migrate_gravity() {
|
|||||||
echo " [i] Gravity migration checks"
|
echo " [i] Gravity migration checks"
|
||||||
gravityDBfile=$(getFTLConfigValue files.gravity)
|
gravityDBfile=$(getFTLConfigValue files.gravity)
|
||||||
|
|
||||||
if [[ -z "${PYTEST}" ]]; then
|
|
||||||
if [[ ! -f /etc/pihole/adlists.list ]]; then
|
if [[ ! -f /etc/pihole/adlists.list ]]; then
|
||||||
echo " [i] No adlist file found, creating one with a default blocklist"
|
echo " [i] No adlist file found, creating one with a default blocklist"
|
||||||
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
|
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "${gravityDBfile}" ]; then
|
if [ ! -f "${gravityDBfile}" ]; then
|
||||||
echo " [i] ${gravityDBfile} does not exist (Likely due to a fresh volume). This is a required file for Pi-hole to operate."
|
echo " [i] ${gravityDBfile} does not exist (Likely due to a fresh volume). This is a required file for Pi-hole to operate."
|
||||||
|
|||||||
@@ -146,12 +146,6 @@ stop() {
|
|||||||
echo " https://docs.docker.com/engine/containers/start-containers-automatically/#use-a-restart-policy"
|
echo " https://docs.docker.com/engine/containers/start-containers-automatically/#use-a-restart-policy"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# If we are running pytest, keep the container alive for a little longer
|
|
||||||
# to allow the tests to complete
|
|
||||||
if [[ ${PYTEST} ]]; then
|
|
||||||
sleep 10
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit "${FTL_EXIT_CODE}"
|
exit "${FTL_EXIT_CODE}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ def docker(request):
|
|||||||
for env_var in env_vars:
|
for env_var in env_vars:
|
||||||
cmd.extend(["-e", env_var])
|
cmd.extend(["-e", env_var])
|
||||||
|
|
||||||
# ensure PYTEST=1 is set
|
|
||||||
if not any("PYTEST=1" in arg for arg in cmd):
|
|
||||||
cmd.extend(["-e", "PYTEST=1"])
|
|
||||||
|
|
||||||
# add default TZ if not already set
|
# add default TZ if not already set
|
||||||
if not any("TZ=" in arg for arg in cmd):
|
if not any("TZ=" in arg for arg in cmd):
|
||||||
cmd.extend(["-e", 'TZ="Europe/London"'])
|
cmd.extend(["-e", 'TZ="Europe/London"'])
|
||||||
|
|||||||
Reference in New Issue
Block a user