From 49a40115c8fd5692b43bce68e9e818dcb0c0d157 Mon Sep 17 00:00:00 2001 From: Jacob Salmela Date: Sat, 5 Dec 2015 14:04:37 -0600 Subject: [PATCH 1/2] fixes #105 --- advanced/dnsmasq.conf | 4 ++-- automated install/basic-install.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/advanced/dnsmasq.conf b/advanced/dnsmasq.conf index 30d7238..8fe5bb2 100644 --- a/advanced/dnsmasq.conf +++ b/advanced/dnsmasq.conf @@ -18,7 +18,7 @@ bogus-priv # uncomment this. no-resolv -# Add other name servers here, with domain specs if they are for +# Add other name servers here, with domain specs if they are for # non-public domains. server=8.8.8.8 server=8.8.4.4 @@ -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 3c6d14f..d2a67a1 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -92,7 +92,6 @@ cmd=(whiptail --separate-output --checklist "Select Protocols" $r $c 2) options=(IPv4 "Block ads over IPv4" on IPv6 "Block ads over IPv4" off) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) -clear for choice in $choices do case $choice in @@ -179,6 +178,7 @@ echo "interface $piholeInterface static ip_address=$IPv4addr static routers=$IPv4gw static domain_name_servers=$IPv4gw" | sudo tee -a $dhcpcdFile >/dev/null +echo "Setting IP to $IPv4addr. You may need to restart after the install is complete." sudo ip addr replace dev $piholeInterface $IPv4addr } @@ -200,6 +200,7 @@ sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig sudo mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.orig sudo mv /etc/crontab /etc/crontab.orig sudo curl -o /etc/dnsmasq.conf https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/dnsmasq.conf +sudo sed -i "s/@INT@/$piholeInterface/" /etc/dnsmasq.conf sudo curl -o /etc/lighttpd/lighttpd.conf https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/lighttpd.conf sudo mv /etc/crontab /etc/crontab.orig sudo curl -o /etc/crontab https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron From f453d407a9f03d6eb601e12936a55e11c76ffe89 Mon Sep 17 00:00:00 2001 From: Jacob Salmela Date: Sat, 5 Dec 2015 14:14:34 -0600 Subject: [PATCH 2/2] log-async For better performance. I have been using it for a few weeks with no adverse effects. --- advanced/dnsmasq.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/advanced/dnsmasq.conf b/advanced/dnsmasq.conf index 8fe5bb2..25f52a5 100644 --- a/advanced/dnsmasq.conf +++ b/advanced/dnsmasq.conf @@ -45,3 +45,6 @@ log-facility=/var/log/pihole.log # server for potentially stale date, you can set a time-to-live (in # seconds) here. local-ttl=300 + +# This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock +log-async