Merge remote-tracking branch 'refs/remotes/pi-hole/development'

Conflicts:
	README.md
	advanced/Scripts/blacklist.sh
	advanced/Scripts/whitelist.sh
	automated install/basic-install.sh
	gravity.sh
This commit is contained in:
nate 2016-03-29 12:57:22 -05:00
commit f8427ab789
6 changed files with 13 additions and 11 deletions

View file

@ -8,4 +8,4 @@ Changes proposed in this pull request:
- -
@pihole/gravity @pi-hole/gravity

View file

@ -29,6 +29,7 @@ reddit: [/r/pihole](https://www.reddit.com/r/pihole/)
[![Pi-hole exlplained](http://i.imgur.com/qNybJDX.png)](https://vimeo.com/135965232) [![Pi-hole exlplained](http://i.imgur.com/qNybJDX.png)](https://vimeo.com/135965232)
## Pi-hole Projects ## Pi-hole Projects
- [Get LED alerts for each blocked ad](http://www.stinebaugh.info/get-led-alerts-for-each-blocked-ad-using-pi-hole/)
- [Pi-hole on Ubuntu 14.04 on VirtualBox](http://hbalagtas.blogspot.com/2016/02/adblocking-with-pi-hole-and-ubuntu-1404.html) - [Pi-hole on Ubuntu 14.04 on VirtualBox](http://hbalagtas.blogspot.com/2016/02/adblocking-with-pi-hole-and-ubuntu-1404.html)
- [x86 Docker container that runs Pi-hole](https://hub.docker.com/r/diginc/pi-hole/) - [x86 Docker container that runs Pi-hole](https://hub.docker.com/r/diginc/pi-hole/)
- [Splunk: Pi-hole Visualizser](https://splunkbase.splunk.com/app/3023/) - [Splunk: Pi-hole Visualizser](https://splunkbase.splunk.com/app/3023/)
@ -41,6 +42,7 @@ reddit: [/r/pihole](https://www.reddit.com/r/pihole/)
- [Minibian Pi-hole](http://munkjensen.net/wiki/index.php/See_my_Pi-Hole#Minibian_Pi-hole) - [Minibian Pi-hole](http://munkjensen.net/wiki/index.php/See_my_Pi-Hole#Minibian_Pi-hole)
## Coverage ## Coverage
- [TekThing: 5 fun, easy projects for a Raspberry Pi](https://youtu.be/QwrKlyC2kdM?t=1m42s)
- [Pi-hole on Adafruit's blog](https://blog.adafruit.com/2016/03/04/pi-hole-is-a-black-hole-for-internet-ads-piday-raspberrypi-raspberry_pi/) - [Pi-hole on Adafruit's blog](https://blog.adafruit.com/2016/03/04/pi-hole-is-a-black-hole-for-internet-ads-piday-raspberrypi-raspberry_pi/)
- [The Defrag Show - MSDN/Channel 9](https://channel9.msdn.com/Shows/The-Defrag-Show/Defrag-Endoscope-USB-Camera-The-Final-HoloLens-Vote-Adblock-Pi-and-more?WT.mc_id=dlvr_twitter_ch9#time=20m39s) - [The Defrag Show - MSDN/Channel 9](https://channel9.msdn.com/Shows/The-Defrag-Show/Defrag-Endoscope-USB-Camera-The-Final-HoloLens-Vote-Adblock-Pi-and-more?WT.mc_id=dlvr_twitter_ch9#time=20m39s)
- [MacObserver Podcast 585](http://www.macobserver.com/tmo/podcast/macgeekgab-585) - [MacObserver Podcast 585](http://www.macobserver.com/tmo/podcast/macgeekgab-585)

1
advanced/index.js Normal file
View file

@ -0,0 +1 @@
var x = "Pi-hole: A black hole for Internet advertisements."

View file

@ -53,4 +53,6 @@ $HTTP["url"] =~ "^/admin/" {
$HTTP["url"] =~ "^(?!/admin)/.*" { $HTTP["url"] =~ "^(?!/admin)/.*" {
# Create a response header for debugging using curl -I # Create a response header for debugging using curl -I
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
# rewrite only js requests
url.rewrite = ("(.*).js" => "pihole/index.js")
} }

View file

@ -115,12 +115,12 @@ welcomeDialogs() {
verifyFreeDiskSpace() { verifyFreeDiskSpace() {
# 25MB is the minimum space needed (20MB install + 5MB one day of logs.) # 50MB is the minimum space needed (45MB install (includes web admin bootstrap/jquery libraries etc) + 5MB one day of logs.)
requiredFreeBytes=51200 requiredFreeBytes=51200
existingFreeBytes=$(df -lk / 2>&1 | awk '{print $4}' | head -2 | tail -1) existingFreeBytes=`df -lk / 2>&1 | awk '{print $4}' | head -2 | tail -1`
if ! [[ "$existingFreeBytes" =~ ^([0-9])+$ ]]; then if ! [[ "$existingFreeBytes" =~ ^([0-9])+$ ]]; then
existingFreeBytes=$(df -lk /dev 2>&1 | awk '{print $4}' | head -2 | tail -1) existingFreeBytes=`df -lk /dev 2>&1 | awk '{print $4}' | head -2 | tail -1`
fi fi
if [[ $existingFreeBytes -lt $requiredFreeBytes ]]; then if [[ $existingFreeBytes -lt $requiredFreeBytes ]]; then
@ -635,8 +635,8 @@ installPiholeWeb() {
else else
printf "\n:::\tNo default index.lighttpd.html file found... not backing up" printf "\n:::\tNo default index.lighttpd.html file found... not backing up"
fi fi
$SUDO cp /etc/.pihole/advanced/index.html /var/www/html/pihole/index.html $SUDO cp /etc/.pihole/advanced/index.* /var/www/html/pihole/.
$SUDO echo "::: done!" $SUDO echo " done!"
fi fi
} }

View file

@ -170,9 +170,6 @@ function gravity_transport() {
fi fi
# Silently curl url # Silently curl url
curl -s $cmd_ext $heisenbergCompensator -A "$agent" $url > $patternBuffer
# Check for list updates
gravity_patternCheck $patternBuffer
curl -s "$cmd_ext" "$heisenbergCompensator" -A "$agent" "$url" > "$patternBuffer" curl -s "$cmd_ext" "$heisenbergCompensator" -A "$agent" "$url" > "$patternBuffer"
# Check for list updates # Check for list updates
gravity_patternCheck "$patternBuffer" gravity_patternCheck "$patternBuffer"