mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2024-12-06 19:27:10 +01:00
Merge pull request #1608 from pi-hole/v6/default-upstream
Default DNS Upstream
This commit is contained in:
@@ -47,9 +47,7 @@ services:
|
||||
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
|
||||
TZ: 'Europe/London'
|
||||
# Set a password to access the web interface. Not setting one will result in a random password being assigned
|
||||
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
||||
# Configure DNS upstream servers, e.g:
|
||||
FTLCONF_dns_upstreams: '8.8.8.8;8.8.4.4'
|
||||
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
||||
# Volumes store your data between container upgrades
|
||||
volumes:
|
||||
# For persisting Pi-hole's databases and common configuration file
|
||||
|
||||
@@ -35,9 +35,7 @@ services:
|
||||
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
|
||||
TZ: 'Europe/London'
|
||||
# Set a password to access the web interface. Not setting one will result in a random password being assigned
|
||||
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
||||
# Configure DNS upstream servers, e.g:
|
||||
FTLCONF_dns_upstreams: '8.8.8.8;8.8.4.4'
|
||||
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
||||
# Volumes store your data between container upgrades
|
||||
volumes:
|
||||
# For persisting Pi-hole's databases and common configuration file
|
||||
|
||||
@@ -61,13 +61,10 @@ ensure_basic_configuration() {
|
||||
chown pihole:pihole /macvendor.db
|
||||
fi
|
||||
|
||||
# If getFTLConfigValue "dns.upstreams" returns [], exit the container. We need upstream servers to function!
|
||||
if [[ $(getFTLConfigValue "dns.upstreams") == "[]" ]]; then
|
||||
echo ""
|
||||
echo " [X] No DNS upstream servers are set!"
|
||||
echo " [i] Recommended: Set the upstream DNS servers in the environment variable FTLCONF_dns_upstreams"
|
||||
echo ""
|
||||
exit 1
|
||||
# If getFTLConfigValue "dns.upstreams" returns [], default to Google's DNS server
|
||||
if [[ $(getFTLConfigValue "dns.upstreams") == "[]" ]]; then
|
||||
echo " [i] No DNS upstream set in environment or config file, defaulting to Google DNS"
|
||||
setFTLConfigValue "dns.upstreams" "[\"8.8.8.8\", \"8.8.4.4\"]"
|
||||
fi
|
||||
|
||||
setup_web_password
|
||||
|
||||
@@ -14,14 +14,14 @@ def test_pihole_gid_env_var(docker):
|
||||
|
||||
|
||||
# Wait 5 seconds for startup, then kill the start.sh script
|
||||
# Finally, tail the FTL log to see if it has been shut down cleanly
|
||||
# Finally, grep the FTL log to see if it has been shut down cleanly
|
||||
def test_pihole_ftl_clean_shutdown(docker):
|
||||
func = docker.run(
|
||||
"""
|
||||
sleep 5
|
||||
killall --signal 15 start.sh
|
||||
sleep 5
|
||||
tail -f /var/log/pihole-FTL.log
|
||||
grep 'jmpret\|terminated' /var/log/pihole/FTL.log
|
||||
"""
|
||||
)
|
||||
assert "INFO: Shutting down... // exit code 0 // jmpret 0" in func.stdout
|
||||
|
||||
Reference in New Issue
Block a user