mirror of
https://github.com/pi-hole/pi-hole
synced 2025-03-08 20:56:06 +00:00
Apply chosen upstream DNS on fresh install
While the dialog is shown to choose or enter an upstream DNS for Pi-hole, it is never applied. Hence fresh Pi-hole installs have no upstream DNS and cannot resolve queries. It is now checked for the two generated variables PIHOLE_DNS_1 and PIHOLE_DNS_2, a TOML array generated and applied via pihole-FTL CLI. Signed-off-by: MichaIng <micha@dietpi.com>
This commit is contained in:
parent
6f82ec5121
commit
49bb6dc0da
@ -2549,9 +2549,14 @@ main() {
|
|||||||
|
|
||||||
restart_service pihole-FTL
|
restart_service pihole-FTL
|
||||||
|
|
||||||
# write privacy level and logging to pihole.toml
|
# apply settings to pihole.toml
|
||||||
# needs to be done after FTL service has been started, otherwise pihole.toml does not exist
|
# needs to be done after FTL service has been started, otherwise pihole.toml does not exist
|
||||||
# set on fresh installations by setPrivacyLevel() and setLogging(
|
# set on fresh installations by setDNS() and setPrivacyLevel() and setLogging()
|
||||||
|
if [ -n "${PIHOLE_DNS_1}" ]; then
|
||||||
|
local string="\"${PIHOLE_DNS_1}\""
|
||||||
|
[ -n "${PIHOLE_DNS_2}" ] && string+=", \"${PIHOLE_DNS_2}\""
|
||||||
|
setFTLConfigValue "dns.upstreams" "[ $string ]"
|
||||||
|
fi
|
||||||
if [ -n "${QUERY_LOGGING}" ]; then
|
if [ -n "${QUERY_LOGGING}" ]; then
|
||||||
setFTLConfigValue "dns.queryLogging" "${QUERY_LOGGING}"
|
setFTLConfigValue "dns.queryLogging" "${QUERY_LOGGING}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user