mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-05 13:40:56 +00:00
Merge pull request #1897 from pi-hole/fix/webpage.sh_interface_setting
Add fallback interface in DNS settings
This commit is contained in:
commit
8f35ebc0c2
@ -175,6 +175,11 @@ trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC68345710423
|
|||||||
add_dnsmasq_setting "local-service"
|
add_dnsmasq_setting "local-service"
|
||||||
else
|
else
|
||||||
# Listen only on one interface
|
# Listen only on one interface
|
||||||
|
# Use eth0 as fallback interface if interface is missing in setupVars.conf
|
||||||
|
if [ -z "${PIHOLE_INTERFACE}" ]; then
|
||||||
|
PIHOLE_INTERFACE="eth0"
|
||||||
|
fi
|
||||||
|
|
||||||
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
|
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -241,7 +246,7 @@ ProcessDHCPSettings() {
|
|||||||
source "${setupVars}"
|
source "${setupVars}"
|
||||||
|
|
||||||
if [[ "${DHCP_ACTIVE}" == "true" ]]; then
|
if [[ "${DHCP_ACTIVE}" == "true" ]]; then
|
||||||
interface=$(grep 'PIHOLE_INTERFACE=' /etc/pihole/setupVars.conf | sed "s/.*=//")
|
interface="${PIHOLE_INTERFACE}"
|
||||||
|
|
||||||
# Use eth0 as fallback interface
|
# Use eth0 as fallback interface
|
||||||
if [ -z ${interface} ]; then
|
if [ -z ${interface} ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user