1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-23 07:18:07 +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:
DL6ER 2018-01-07 14:34:02 +01:00
parent 3dc3e8e40e
commit 9d50f52bb2
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -175,7 +175,13 @@ 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
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 fi
} }