mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Add fallback interface for DNS listening behavior in case PIHOLE_INTERFACE is not set in setupVars.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
3dc3e8e40e
commit
9d50f52bb2
1 changed files with 7 additions and 1 deletions
|
@ -175,7 +175,13 @@ trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC68345710423
|
|||
add_dnsmasq_setting "local-service"
|
||||
else
|
||||
# Listen only on one interface
|
||||
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
|
||||
interface=$(grep 'PIHOLE_INTERFACE=' /etc/pihole/setupVars.conf | sed "s/.*=//")
|
||||
# Use eth0 as fallback interface if interface is missing in setupVars.conf
|
||||
if [ -z "${interface}" ]; then
|
||||
interface="eth0"
|
||||
fi
|
||||
|
||||
add_dnsmasq_setting "interface" "${interface}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue