From 793bdd9743c76d7015e06e2bb0176b5ad163dded Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 7 Jan 2018 14:36:03 +0100 Subject: [PATCH] No need for cat | sed here as we source setupVars.conf, so we can use interface="${PIHOLE_INTERFACE}" Signed-off-by: DL6ER --- advanced/Scripts/webpage.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 3bfdcf0b..588a88ae 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -175,13 +175,12 @@ trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC68345710423 add_dnsmasq_setting "local-service" else # Listen only on one 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" + if [ -z "${PIHOLE_INTERFACE}" ]; then + PIHOLE_INTERFACE="eth0" fi - add_dnsmasq_setting "interface" "${interface}" + add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}" fi } @@ -247,7 +246,7 @@ ProcessDHCPSettings() { source "${setupVars}" if [[ "${DHCP_ACTIVE}" == "true" ]]; then - interface=$(grep 'PIHOLE_INTERFACE=' /etc/pihole/setupVars.conf | sed "s/.*=//") + interface="${PIHOLE_INTERFACE}" # Use eth0 as fallback interface if [ -z ${interface} ]; then