The changes to the gravity script check for a temp file containing the
static address set during the install. I need to verify it works so I
have to change the URL. I will change it back before merging with
master.
Created a function to set a static IP address.
I also sent STDOUT and STDERR to /dev/null so it doesn't mangle the
progress bar. When the device reboots, it still gets mangled a bit
(via ssh).
The ellipses cause errors, so they were removed.
I was on the right track with the associate array, but it would
previously execute the commands out of order. Following directions
from the URL in the comments, I made another array that helps keep the
array in the order.
This is a large update that helps users install the Pi-hole a bit
easier by using some dialog windows and also letting the user set a
static IP (I still need to figure out how to actually set the address
in the system, but everything else having to do with the install script
works).
This seems to be the more appropriate URL:
http://hosts-file.net/ad_servers.txt.
I compared it to the original URL using opendiff and they are exactly
the same.
lighttpd in Jessie uses /var/www/html for the root folder, so in order
to only edit one lightpd.conf file, the installer will create the
correct directory even if not being run on Jessie.
Match domain exactly instead of partially.
Gather list of domains to minimize number of times that hosts file must be enumerated.
Only add domain to whitelist if it isn't already present.
In my case there had been no whitespace in piholeIP (I configured it statically because 'hostname -I' returns multiple IP addresses, which ends in errornous hosts file), so it's more safe to add one between IP and hostname.
Further, I removed the obsolete latentBlacklist variable.
This adds in some back end improvements for better debugging. It also
allows you to access the Web interface, while you are connected to the
Pi-hole, which resolves#31
Since the version of lighted in Jessie moved the default folder to
/var/www/html, I am going to make it the same for wheezy for better
compatibility.
Also removed spaces