From 3651ee5480a434435d8800d98b759353709c1a08 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 3 Dec 2015 09:56:27 -0800 Subject: [PATCH] Bugfix for hardcoded dnsmasq.conf interface Add target to dnsmasq.conf for sed Replace dnsmasq.conf target with selected interface --- advanced/dnsmasq.conf | 2 +- automated install/basic-install.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/advanced/dnsmasq.conf b/advanced/dnsmasq.conf index 30d7238..c426916 100644 --- a/advanced/dnsmasq.conf +++ b/advanced/dnsmasq.conf @@ -26,7 +26,7 @@ server=8.8.4.4 # If you want dnsmasq to listen for DHCP and DNS requests only on # specified interfaces (and the loopback) give the name of the # interface (eg eth0) here. -interface=eth0 +interface=@INT@ # Or which to listen on by address (remember to include 127.0.0.1 if # you use this.) listen-address=127.0.0.1 diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index f59214b..04f1b39 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -82,6 +82,7 @@ for desiredInterface in $chooseInterfaceOptions do piholeInterface=$desiredInterface echo "Using interface: $piholeInterface" + echo ${piholeInterface} > /tmp/piholeINT done } @@ -195,6 +196,7 @@ sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig sudo curl -o /etc/dnsmasq.conf https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/dnsmasq.conf sudo curl -o /etc/lighttpd/lighttpd.conf https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/lighttpd.conf +sudo sed -i "s/@INT@/$piholeInterface/" /etc/dnsmasq.conf } stopServices(){