diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index c5081fd5..3bfdcf0b 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -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 }