Merge pull request #729 from pi-hole/development

Pi-hole version 2.9.2
pull/754/head V2.9.2
Adam Warner 8 years ago committed by GitHub
commit 5966d76e9a

@ -0,0 +1,37 @@
_This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._
# Contributors Guide
Please read and understand the contribution guide before creating an issue or pull request.
## Etiquette
- Our goal for Pi-hole is **stability before features**. This means we focus on squashing critical bugs before adding new features. Often, we can do both in tandem, but bugs will take priority over a new feature.
- Pi-hole is open source and [powered by donations](https://pi-hole.net/donate/), and as such, we give our **free time** to build, maintain, and **provide user support** for this project. It would be extremely unfair for us to suffer abuse or anger for our hard work, so please take a moment to consider that.
- Please be considerate towards the developers and other users when raising issues or presenting pull requests.
- Respect our decision(s), and do not be upset or abusive if your submission is not used.
## Viability
When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many people, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project.
## Procedure
**Before filing an issue:**
- Attempt to replicate and **document** the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
**Before submitting a pull request:**
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
## Technical Requirements
- Submit Pull Requests to the **development branch only**.
- Before Submitting your Pull Request, merge `development` with your new branch and fix any conflicts. (Make sure you don't break anything in development!)
- Commit Unix line endings.
- (Optional fun) keep to the theme of Star Trek/black holes/gravity.

@ -1,7 +1,42 @@
##### Expected Behaviour:
_This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._
**In raising this issue, I confirm the following (please check boxes, eg [X]):**
##### Actual Behaviour:
- [ ] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [ ] The issue I am reporting can be *replicated*
- [ ] The issue I'm reporting isn't a duplicate (see [FAQs](https://github.com/pi-hole/pi-hole/wiki/FAQs), [closed issues](https://github.com/pi-hole/pi-hole/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), and [open issues](https://github.com/pi-hole/pi-hole/issues)).
**How familiar are you with the codebase?:**
##### Steps to reproduce this issue:
- [ ] 1 (very unfamiliar)
- [ ] 2
- [ ] 3
- [ ] 4
- [ ] 5
- [ ] 6
- [ ] 7
- [ ] 8
- [ ] 9
- [ ] 10 (very familiar)
---
**[FEATURE REQUEST | QUESTION | OTHER]:**
_{replace this section with your content or delete if not a FEATURE REQUEST/QUESTION/OTHER}_
**[BUG | ISSUE] Expected Behaviour:**
**[BUG | ISSUE] Actual Behaviour:**
**[BUG | ISSUE] Steps to reproduce:**
-
-
-
-
**(Optional) Debug Log generated by `pihole -d`:**
`http://termbin.com/<something>`

@ -1,11 +1,25 @@
Fixes #[issue number] .
_This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._
Changes proposed in this pull request:
**By submitting this pull request, I confirm the following (please check boxes, eg [X]):**
-
- [ ] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [ ] I have checked that [another pull request](https://github.com/pi-hole/pi-hole/pulls) for this purpose does not exist.
- [ ] I have considered, and confirmed that this submission will be valuable to others.
- [ ] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [ ] I give this submission freely, and claim no ownership to its content.
-
**How familiar are you with the codebase?:**
-
- [ ] 1 (very unfamiliar)
- [ ] 2
- [ ] 3
- [ ] 4
- [ ] 5
- [ ] 6
- [ ] 7
- [ ] 8
- [ ] 9
- [ ] 10 (very familiar)
@pi-hole/gravity
---
_{replace this line with your pull request content}_

@ -1,6 +1,6 @@
approve_by_comment: true
approve_regex: '^(Approved|:shipit:|:\+1:)'
reject_regex: '^(Rejected|:-1:)'
approve_regex: '^(Approved|:shipit:|:\+1:|Engage)'
reject_regex: '^(Rejected|:-1:|Borg)'
reset_on_push: true
author_approval: required
reviewers:
@ -12,3 +12,8 @@ reviewers:
- PromoFaux
name: pullapprove
required: 3
always_pending:
title_regex: '(WIP|wip)'
labels:
- wip
explanation: 'This PR is a work in progress...'

@ -1,8 +0,0 @@
This is a basic checklist for now, We will update it in the future.
* Fork the repo and create your new branch based on the `development` branch.
* Commit Unix line endings
* If you want, try to keep to the theme of black holes/gravity. This can add some fun to your submission.
* Submit Pull Requests to the development branch only.
* Before Submitting your Pull Request, merge `development` with your new branch and fix any conflicts. (Make sure you don't break anything in development!)
* Be patient. We will review all submitted pull requests, but our focus is on stability.. please don't be offended if we reject your PR, or it appears we're doing nothing with it! We'll get around to it..

@ -93,7 +93,7 @@ You can view [real-time stats](http://pi-hole.net/faq/install-the-real-time-lcd-
- [Pi-hole stats in your Mac's menu bar](https://getbitbar.com/plugins/Network/pi-hole.1m.py)
- [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)
- [x86 Docker container that runs Pi-hole](https://hub.docker.com/r/diginc/pi-hole/)
- [Docker Pi-hole container (x86 and ARM)](https://hub.docker.com/r/diginc/pi-hole/)
- [Splunk: Pi-hole Visualizser](https://splunkbase.splunk.com/app/3023/)
- [Pi-hole Chrome extension](https://chrome.google.com/webstore/detail/pi-hole-list-editor/hlnoeoejkllgkjbnnnhfolapllcnaglh) ([open source](https://github.com/packtloss/pihole-extension))
- [Go Bananas for CHiP-hole ad blocking](https://www.hackster.io/jacobsalmela/chip-hole-network-wide-ad-blocker-98e037)

@ -3,13 +3,14 @@
# (c) 2015, 2016 by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
# http://pi-hole.net
# Generates pihole_debug.log in /var/log/ to be used for troubleshooting.
# Generates pihole_debug.log to be used for troubleshooting.
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
set -o pipefail
######## GLOBAL VARS ########
DEBUG_LOG="/var/log/pihole_debug.log"
@ -25,18 +26,27 @@ ADLISTSFILE="/etc/pihole/adlists.list"
PIHOLELOG="/var/log/pihole.log"
WHITELISTMATCHES="/tmp/whitelistmatches.list"
# Header info and introduction
echo "::: Beginning Pi-hole debug at $(date)!"
echo "::: This debugging process will collect information from your running configuration,"
echo "::: and optionally upload the generated log to a unique and random directory on"
echo "::: Termbin.com. NOTE: All log files auto-delete after 1 month and you are the only"
echo "::: person who is given the unique URL. Please consider where you post this link."
echo "::: "
######## FIRST CHECK ########
# Must be root to debug
if [[ $EUID -eq 0 ]]; then
echo "::: You are root... Beginning debug!"
if [[ "$EUID" -eq 0 ]]; then
echo "::: Script is executing as root user..."
else
echo "::: Sudo will be used for debugging."
echo "::: Non-root user detected..."
# Check if sudo is actually installed
if [ -x "$(command -v sudo)" ]; then
export SUDO="sudo"
echo "::: sudo command located, debug will run under sudo."
else
echo "::: Please install sudo or run this as root."
echo "::: Unable to locate sudo command. Please install sudo or run this as root."
exit 1
fi
fi
@ -51,68 +61,153 @@ else
fi
### Private functions exist here ###
function versionCheck {
echo "#######################################" >> ${DEBUG_LOG}
echo "########## Versions Section ###########" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
TMP=$(cd /etc/.pihole/ && git describe --tags --abbrev=0)
echo "Pi-hole Version: $TMP" >> ${DEBUG_LOG}
TMP=$(cd /var/www/html/admin && git describe --tags --abbrev=0)
echo "WebUI Version: $TMP" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
function log_write {
echo "$1" >> "${DEBUG_LOG}"
}
function distroCheck {
echo "#######################################" >> ${DEBUG_LOG}
echo "######## Distribution Section #########" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
TMP=$(cat /etc/*release || echo "Failed to find release")
echo "Distribution Version: $TMP" >> ${DEBUG_LOG}
function version_check {
log_write "############################################################"
log_write "########## Installed Versions ##########"
log_write "############################################################"
echo "::: Detecting Pi-hole installed versions."
pi_hole_ver="$(cd /etc/.pihole/ && git describe --tags --abbrev=0)" \
&& log_write "Pi-hole Version: $pi_hole_ver" || log_write "Pi-hole git repository not detected."
admin_ver="$(cd /var/www/html/admin && git describe --tags --abbrev=0)" \
&& log_write "WebUI Version: $admin_ver" || log_write "Pi-hole Admin Pages git repository not detected."
echo "::: Writing lighttpd version to logfile."
light_ver="$(lighttpd -v |& head -n1)" && log_write "${light_ver}" || log_write "lighttpd not installed."
echo "::: Writing PHP version to logfile."
php_ver="$(php -v |& head -n1)" && log_write "${php_ver}" || log_write "PHP not installed."
}
function compareWhitelist {
if [ ! -f "$WHITELISTMATCHES" ]; then
${SUDO} touch ${WHITELISTMATCHES}
${SUDO} chmod 644 ${WHITELISTMATCHES}
${SUDO} chown "$USER":root ${WHITELISTMATCHES}
else
truncate -s 0 ${WHITELISTMATCHES}
fi
echo "#######################################" >> ${DEBUG_LOG}
echo "######## Whitelist Comparison #########" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
while read -r line; do
TMP=$(grep -w ".* $line$" "$GRAVITYFILE")
if [ ! -z "$TMP" ]; then
echo "$TMP" >> ${DEBUG_LOG}
echo "$TMP" >> ${WHITELISTMATCHES}
fi
done < "$WHITELISTFILE"
function distro_check {
echo "############################################################" >> ${DEBUG_LOG}
echo "######## Installed OS Distribution #########" >> ${DEBUG_LOG}
echo "############################################################" >> ${DEBUG_LOG}
echo "::: Checking installed OS Distribution release."
TMP=$(cat /etc/*release || echo "Failed to find release")
echo "::: Writing OS Distribution release to logfile."
echo "$TMP" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
}
function compareBlacklist {
echo "#######################################" >> ${DEBUG_LOG}
echo "######## Blacklist Comparison #########" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
while read -r line; do
if [ ! -z "$line" ]; then
grep -w ".* $line$" "$GRAVITYFILE" >> ${DEBUG_LOG}
fi
done < "$BLACKLISTFILE"
echo >> ${DEBUG_LOG}
function ip_check {
echo "############################################################" >> ${DEBUG_LOG}
echo "######## IP Address Information #########" >> ${DEBUG_LOG}
echo "############################################################" >> ${DEBUG_LOG}
echo "::: Writing local IPs to logfile"
IPADDR="$(ip a | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "inet") print $(i+1) }')"
echo "$IPADDR" >> ${DEBUG_LOG}
IP6ADDR="$(ip a | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "inet6") print $(i+1) }')" \
&& echo "$IP6ADDR" >> ${DEBUG_LOG} || echo "No IPv6 addresses found." >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
echo "::: Locating default gateway and checking connectivity"
GATEWAY=$(ip r | grep default | cut -d ' ' -f 3)
if [[ $? = 0 ]]
then
echo "::: Pinging default IPv4 gateway..."
GATEWAY_CHECK=$(ping -q -w 3 -c 3 -n "${GATEWAY}" | tail -n3)
if [[ $? = 0 ]]
then
echo "IPv4 Gateway check:" >> ${DEBUG_LOG}
else
echo "IPv4 Gateway check failed:" >> ${DEBUG_LOG}
fi
echo "$GATEWAY_CHECK" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
echo "::: Pinging Internet via IPv4..."
INET_CHECK=$(ping -q -w 5 -c 3 -n 8.8.8.8 | tail -n3)
if [[ $? = 0 ]]
then
echo "IPv4 Internet check:" >> ${DEBUG_LOG}
else
echo "IPv4 Internet check failed:" >> ${DEBUG_LOG}
fi
echo "$INET_CHECK" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
fi
GATEWAY6=$(ip -6 r | grep default | cut -d ' ' -f 3)
if [[ $? = 0 ]]
then
echo "::: Pinging default IPv6 gateway..."
GATEWAY6_CHECK=$(ping6 -q -w 3 -c 3 -n "${GATEWAY6}" | tail -n3)
if [[ $? = 0 ]]
then
echo "IPv6 Gateway check:" >> ${DEBUG_LOG}
else
echo "IPv6 Gateway check failed:" >> ${DEBUG_LOG}
fi
echo "::: Pinging Internet via IPv6..."
GATEWAY6_CHECK=$(ping6 -q -w 3 -c 3 -n 2001:4860:4860::8888 | tail -n3)
if [[ $? = 0 ]]
then
echo "IPv6 Internet check:" >> ${DEBUG_LOG}
else
echo "IPv6 Internet check failed:" >> ${DEBUG_LOG}
fi
else
GATEWAY_CHECK="No IPv6 Gateway Detected"
fi
echo "$GATEWAY_CHECK" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
}
function testNslookup {
TESTURL="doubleclick.com"
echo "#######################################" >> ${DEBUG_LOG}
echo "############ NSLookup Test ############" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
function hostnameCheck {
echo "############################################################" >> ${DEBUG_LOG}
echo "######## Hostname Information #########" >> ${DEBUG_LOG}
echo "############################################################" >> ${DEBUG_LOG}
echo "::: Writing locally configured hostnames to logfile"
# Write the hostname output to compare against entries in /etc/hosts, which is logged next
echo "This Pi-hole is: $(hostname)" >> ${DEBUG_LOG}
echo "::: Writing hosts file to debug log..."
echo "### Hosts ###" >> ${DEBUG_LOG}
if [ -e "$HOSTSFILE" ]
then
cat "$HOSTSFILE" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
else
echo "No hosts file found!" >> ${DEBUG_LOG}
printf ":::\tNo hosts file found!\n"
fi
}
function portCheck {
echo "############################################################" >> ${DEBUG_LOG}
echo "######## Open Port Information #########" >> ${DEBUG_LOG}
echo "############################################################" >> ${DEBUG_LOG}
echo "::: Detecting local server port 80 and 53 processes."
${SUDO} lsof -i :80 >> ${DEBUG_LOG}
${SUDO} lsof -i :53 >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
}
function testResolver {
echo "############################################################" >> ${DEBUG_LOG}
echo "############ Resolver Functions Check ############" >> ${DEBUG_LOG}
echo "############################################################" >> ${DEBUG_LOG}
# Find a blocked url that has not been whitelisted.
TESTURL="doubleclick.com"
if [ -s "$WHITELISTMATCHES" ]; then
while read -r line; do
CUTURL=${line#*" "}
@ -128,12 +223,43 @@ function testNslookup {
done < "$GRAVITYFILE"
fi
echo "NSLOOKUP of $TESTURL from PiHole:" >> ${DEBUG_LOG}
nslookup "$TESTURL" >> ${DEBUG_LOG}
echo "Resolution of $TESTURL from Pi-hole:" >> ${DEBUG_LOG}
LOCALDIG=$(dig "$TESTURL" @127.0.0.1)
if [[ $? = 0 ]]
then
echo "$LOCALDIG" >> ${DEBUG_LOG}
else
echo "Failed to resolve $TESTURL on Pi-hole" >> ${DEBUG_LOG}
fi
echo >> ${DEBUG_LOG}
echo "NSLOOKUP of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
nslookup "$TESTURL" 8.8.8.8 >> ${DEBUG_LOG}
echo "Resolution of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
REMOTEDIG=$(dig "$TESTURL" @8.8.8.8)
if [[ $? = 0 ]]
then
echo "$REMOTEDIG" >> ${DEBUG_LOG}
else
echo "Failed to resolve $TESTURL on 8.8.8.8" >> ${DEBUG_LOG}
fi
echo >> ${DEBUG_LOG}
echo "Pi-hole dnsmasq specific records lookups" >> ${DEBUG_LOG}
echo "Cache Size:" >> ${DEBUG_LOG}
dig +short chaos txt cachesize.bind >> ${DEBUG_LOG}
echo "Insertions count:" >> ${DEBUG_LOG}
dig +short chaos txt insertions.bind >> ${DEBUG_LOG}
echo "Evictions count:" >> ${DEBUG_LOG}
dig +short chaos txt evictions.bind >> ${DEBUG_LOG}
echo "Misses count:" >> ${DEBUG_LOG}
dig +short chaos txt misses.bind >> ${DEBUG_LOG}
echo "Hits count:" >> ${DEBUG_LOG}
dig +short chaos txt hits.bind >> ${DEBUG_LOG}
echo "Auth count:" >> ${DEBUG_LOG}
dig +short chaos txt auth.bind >> ${DEBUG_LOG}
echo "Upstream Servers:" >> ${DEBUG_LOG}
dig +short chaos txt servers.bind >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
}
function checkProcesses {
@ -150,6 +276,7 @@ function checkProcesses {
echo " processes status:" >> ${DEBUG_LOG}
${SUDO} systemctl -l status "$i" >> "$DEBUG_LOG"
done
echo >> ${DEBUG_LOG}
}
function debugLighttpd {
@ -186,26 +313,13 @@ function debugLighttpd {
### END FUNCTIONS ###
### Check Pi internet connections ###
# Log the IP addresses of this Pi
IPADDR=$(${SUDO} ifconfig | perl -nle 's/dr:(\S+)/print $1/e')
echo "::: Writing local IPs to debug log"
echo "IP Addresses of this Pi:" >> ${DEBUG_LOG}
echo "$IPADDR" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
# Check if we can connect to the local gateway
GATEWAY_CHECK=$(ping -q -w 1 -c 1 "$(ip r | grep default | cut -d ' ' -f 3)" > /dev/null && echo ok || echo error)
echo "Gateway check:" >> ${DEBUG_LOG}
echo "$GATEWAY_CHECK" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
versionCheck
distroCheck
compareWhitelist
compareBlacklist
testNslookup
version_check
distro_check
ip_check
hostnameCheck
portCheck
checkProcesses
testResolver
debugLighttpd
echo "::: Writing dnsmasq.conf to debug log..."
@ -258,24 +372,8 @@ else
printf ":::\tNo gravity.list file found\n"
fi
# Write the hostname output to compare against entries in /etc/hosts, which is logged next
echo "Hostname of this pihole is: " >> ${DEBUG_LOG}
hostname >> ${DEBUG_LOG}
echo "::: Writing hosts file to debug log..."
echo "#######################################" >> ${DEBUG_LOG}
echo "################ Hosts ################" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
if [ -e "$HOSTSFILE" ]
then
cat "$HOSTSFILE" >> ${DEBUG_LOG}
echo >> ${DEBUG_LOG}
else
echo "No hosts file found!" >> ${DEBUG_LOG}
printf ":::\tNo hosts file found!\n"
fi
### PiHole application specific logging ###
### Pi-hole application specific logging ###
echo "::: Writing whitelist to debug log..."
echo "#######################################" >> ${DEBUG_LOG}
echo "############## Whitelist ##############" >> ${DEBUG_LOG}
@ -308,7 +406,12 @@ echo "############ adlists.list #############" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
if [ -e "$ADLISTSFILE" ]
then
cat "$ADLISTSFILE" >> ${DEBUG_LOG}
while read -r line; do
if [ ! -z "$line" ]; then
[[ "$line" =~ ^#.*$ ]] && continue
echo "$line" >> ${DEBUG_LOG}
fi
done < "$ADLISTSFILE"
echo >> ${DEBUG_LOG}
else
echo "No adlists.list file found... using adlists.default!" >> ${DEBUG_LOG}
@ -319,7 +422,7 @@ fi
# Continuously append the pihole.log file to the pihole_debug.log file
function dumpPiHoleLog {
trap '{ echo -e "\n::: Finishing debug write from interrupt... Quitting!" ; exit 1; }' INT
echo -e "::: Writing current pihole traffic to debug log...\n:::\tTry loading any/all sites that you are having trouble with now... \n:::\t(Press ctrl+C to finish)"
echo -e "::: Writing current Pi-hole traffic to debug log...\n:::\tTry loading any/all sites that you are having trouble with now... \n:::\t(Press ctrl+C to finish)"
echo "#######################################" >> ${DEBUG_LOG}
echo "############# pihole.log ##############" >> ${DEBUG_LOG}
echo "#######################################" >> ${DEBUG_LOG}
@ -338,7 +441,7 @@ function dumpPiHoleLog {
# Anything to be done after capturing of pihole.log terminates
function finalWork {
echo "::: Finshed debugging!"
echo "::: The degug log can be uploaded to Termbin.com for easier sharing."
echo "::: The debug log can be uploaded to Termbin.com for easier sharing."
read -r -p "::: Would you like to upload the log? [y/N] " response
case ${response} in
[yY][eE][sS]|[yY])

@ -1,69 +0,0 @@
#!/usr/bin/env bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2015, 2016 by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
# http://pi-hole.net
# Updates the Pi-hole web interface
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
WEB_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
WEB_INTERFACE_DIR="/var/www/html/admin"
main() {
prerequisites
if ! is_repo; then
make_repo
fi
update_repo
}
prerequisites() {
# must be root to update
if [[ $EUID -ne 0 ]]; then
sudo bash "$0" "$@"
exit $?
fi
# web interface must already exist. this is a (lazy)
# check to make sure pihole is actually installed.
if [ ! -d "$WEB_INTERFACE_DIR" ]; then
echo "$WEB_INTERFACE_DIR not found. Exiting."
exit 1
fi
if ! type "git" > /dev/null; then
apt-get -y install git
fi
}
is_repo() {
# if the web interface directory does not have a .git folder
# it means its using the master.zip archive from the install
# script.
if [ ! -d "$WEB_INTERFACE_DIR/.git" ]; then
return 1
fi
return 0
}
# removes the web interface installed from the master.zip archive and
# replaces it with the current master branch from github
make_repo() {
# remove the non-repod interface and clone the interface
rm -rf ${WEB_INTERFACE_DIR}
git clone "$WEB_INTERFACE_GIT_URL" "$WEB_INTERFACE_DIR"
}
# pulls the latest master branch from github
update_repo() {
# pull the latest commits
cd "$WEB_INTERFACE_DIR"
git pull
}
main

@ -13,9 +13,8 @@
# Download any updates from the adlists
59 1 * * 7 root /usr/local/bin/pihole updateGravity
# Pi-hole: Update the Web interface shortly after gravity runs
# This should also update the version number if it is changed in the dashboard repo
30 2 * * 7 root /usr/local/bin/pihole updateDashboard
# Pi-hole: Update Pi-hole! Uncomment to enable auto update
#30 2 * * 7 root /usr/local/bin/pihole updatePihole
# Pi-hole: Parse the log file before it is flushed and save the stats to a database
# This will be used for a historical view of your Pi-hole's performance

@ -59,7 +59,14 @@ fi
# Compatibility
if [ -x "$(command -v apt-get)" ];then
# Debian Family
#Debian Family
#Decide if php should be `php5` or just `php` (Fixes issues with Ubuntu 16.04 LTS)
phpVer="php"
${SUDO} apt-get install --dry-run php5 > /dev/null 2>&1
if [ $? == 0 ]; then
phpVer="php5"
fi
#############################################
PKG_MANAGER="apt-get"
PKG_CACHE="/var/cache/apt"
UPDATE_PKG_CACHE="$PKG_MANAGER -qq update"
@ -67,7 +74,7 @@ if [ -x "$(command -v apt-get)" ];then
PKG_INSTALL="$PKG_MANAGER --yes --quiet install"
PKG_COUNT="$PKG_MANAGER -s -o Debug::NoLocking=true upgrade | grep -c ^Inst"
INSTALLER_DEPS=( apt-utils whiptail dhcpcd5)
PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget sudo netcat cron )
PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer} git curl unzip wget sudo netcat cron iproute2 )
LIGHTTPD_USER="www-data"
LIGHTTPD_GROUP="www-data"
LIGHTTPD_CFG="lighttpd.conf.debian"
@ -142,27 +149,27 @@ verifyFreeDiskSpace() {
# 50MB is the minimum space needed (45MB install (includes web admin bootstrap/jquery libraries etc) + 5MB one day of logs.)
# - Fourdee: Local ensures the variable is only created, and accessible within this function/void. Generally considered a "good" coding practice for non-global variables.
echo "::: Verifying free disk space..."
local required_free_kilobytes=51200
local existing_free_kilobytes=$(df -Pk | grep -m1 '\/$' | awk '{print $4}')
# - Unknown free disk space , not a integer
if ! [[ "$existing_free_kilobytes" =~ ^([0-9])+$ ]]; then
whiptail --title "Unknown free disk space" --yesno "We were unable to determine available free disk space on this system.\n\nYou may override this check and force the installation, however, it is not recommended.\n\nWould you like to continue with the installation?" --defaultno --backtitle "Pi-hole" ${r} ${c}
local choice=$?
if (( $choice != 0 )); then
echo "non-integer value from existing_free_kilobytes ($existing_free_kilobytes)"
echo "Unknown free space, user aborted, exiting..."
exit 1
fi
echo "::: Unknown free disk space!"
echo "::: We were unable to determine available free disk space on this system."
echo "::: You may override this check and force the installation, however, it is not recommended"
echo "::: To do so, pass the argument '--i_do_not_follow_recommendations' to the install script"
echo "::: eg. curl -L https://install.pi-hole.net | bash /dev/stdin --i_do_not_follow_recommendations"
exit 1
# - Insufficient free disk space
elif [[ $existing_free_kilobytes -lt $required_free_kilobytes ]]; then
elif [[ ${existing_free_kilobytes} -lt ${required_free_kilobytes} ]]; then
echo "::: Insufficient Disk Space!"
echo "::: Your system appears to be low on disk space. pi-hole recommends a minimum of $required_free_kilobytes KiloBytes."
echo "::: You only have $existing_free_kilobytes KiloBytes free."
echo "::: If this is a new install you may need to expand your disk."
echo "::: Try running 'sudo raspi-config', and choose the 'expand file system option'"
echo "::: After rebooting, run this installation again. (curl -L https://install.pi-hole.net | bash)"
whiptail --msgbox --backtitle "Insufficient Disk Space" --title "Insufficient Disk Space" "\nYour system appears to be low on disk space. pi-hole recomends a minimum of $required_free_kilobytes KiloBytes.\nYou only have $existing_free_kilobytes KiloBytes free.\n\nIf this is a new install you may need to expand your disk.\n\nTry running:\n 'sudo raspi-config'\nChoose the 'expand file system option'\n\nAfter rebooting, run this installation again.\n\ncurl -L install.pi-hole.net | bash\n" $r $c
echo "$existing_free_kilobytes is less than $required_free_kilobytes"
echo "Insufficient free space, exiting..."
exit 1
@ -188,14 +195,13 @@ chooseInterface() {
# Find out how many interfaces are available to choose from
interfaceCount=$(echo "$availableInterfaces" | wc -l)
chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface" ${r} ${c} ${interfaceCount})
chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface (press space to select)" ${r} ${c} ${interfaceCount})
chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty)
if [[ $? = 0 ]]; then
for desiredInterface in ${chooseInterfaceOptions}
do
piholeInterface=${desiredInterface}
echo "::: Using interface: $piholeInterface"
echo "${piholeInterface}" > /tmp/piholeINT
done
else
echo "::: Cancel selected, exiting...."
@ -204,13 +210,6 @@ chooseInterface() {
}
cleanupIPv6() {
# Removes IPv6 indicator file if we are not using IPv6
if [ -f "/etc/pihole/.useIPv6" ] && [ ! "$useIPv6" ]; then
rm /etc/pihole/.useIPv6
fi
}
use4andor6() {
# Let use select IPv4 and/or IPv6
cmd=(whiptail --separate-output --checklist "Select Protocols (press space to select)" ${r} ${c} 2)
@ -249,7 +248,7 @@ use4andor6() {
echo "::: Exiting"
exit 1
fi
cleanupIPv6
else
echo "::: Cancel selected. Exiting..."
exit 1
@ -260,8 +259,6 @@ useIPv6dialog() {
# Show the IPv6 address used for blocking
piholeIPv6=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
whiptail --msgbox --backtitle "IPv6..." --title "IPv6 Supported" "$piholeIPv6 will be used to block ads." ${r} ${c}
${SUDO} touch /etc/pihole/.useIPv6
}
getStaticIPv4Settings() {
@ -273,8 +270,6 @@ getStaticIPv4Settings() {
whiptail --msgbox --backtitle "IP information" --title "FYI: IP Conflict" "It is possible your router could still try to assign this IP to a device, which would cause a conflict. But in most cases the router is smart enough to not do that.
If you are worried, either manually set the address, or modify the DHCP reservation pool so it does not include the IP you want.
It is also possible to use a DHCP reservation, but if you are going to do that, you might as well set a static address." ${r} ${c}
#piholeIP is saved to a permanent file so gravity.sh can use it when updating
${SUDO} echo "${IPv4addr%/*}" > /etc/pihole/piholeIP
# Nothing else to do since the variables are already set above
else
# Otherwise, we need to ask the user to input their desired settings.
@ -294,10 +289,6 @@ It is also possible to use a DHCP reservation, but if you are going to do that,
if (whiptail --backtitle "Calibrating network interface" --title "Static IP Address" --yesno "Are these settings correct?
IP address: $IPv4addr
Gateway: $IPv4gw" ${r} ${c}); then
# If the settings are correct, then we need to set the piholeIP
# Saving it to a temporary file us to retrieve it later when we run the gravity.sh script. piholeIP is saved to a permanent file so gravity.sh can use it when updating
$SUDO echo "${IPv4addr%/*}" > /etc/pihole/piholeIP
$SUDO echo "$piholeInterface" > /tmp/piholeINT
# After that's done, the loop ends and we move on
ipSettingsCorrect=True
else
@ -358,6 +349,9 @@ setStaticIPv4() {
${SUDO} echo "ONBOOT=yes" >> ${IFCFG_FILE}
${SUDO} echo "IPADDR=$IPADDR" >> ${IFCFG_FILE}
${SUDO} echo "PREFIX=$CIDR" >> ${IFCFG_FILE}
${SUDO} echo "GATEWAY=$IPv4gw" >> ${IFCFG_FILE}
${SUDO} echo "DNS1=$piholeDNS1" >> ${IFCFG_FILE}
${SUDO} echo "DNS2=$piholeDNS2" >> ${IFCFG_FILE}
${SUDO} echo "USERCTL=no" >> ${IFCFG_FILE}
${SUDO} ip addr replace dev "$piholeInterface" "$IPv4addr"
if [ -x "$(command -v nmcli)" ];then
@ -543,11 +537,10 @@ installScripts() {
${SUDO} cp /etc/.pihole/advanced/Scripts/blacklist.sh /opt/pihole/blacklist.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/piholeDebug.sh /opt/pihole/piholeDebug.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/piholeLogFlush.sh /opt/pihole/piholeLogFlush.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/updateDashboard.sh /opt/pihole/updateDashboard.sh
${SUDO} cp /etc/.pihole/automated\ install/uninstall.sh /opt/pihole/uninstall.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh
${SUDO} cp /etc/.pihole/advanced/Scripts/version.sh /opt/pihole/version.sh
${SUDO} chmod 755 /opt/pihole/gravity.sh /opt/pihole/chronometer.sh /opt/pihole/whitelist.sh /opt/pihole/blacklist.sh /opt/pihole/piholeLogFlush.sh /opt/pihole/updateDashboard.sh /opt/pihole/uninstall.sh /opt/pihole/setupLCD.sh /opt/pihole/version.sh
${SUDO} chmod 755 /opt/pihole/gravity.sh /opt/pihole/chronometer.sh /opt/pihole/whitelist.sh /opt/pihole/blacklist.sh /opt/pihole/piholeLogFlush.sh /opt/pihole/uninstall.sh /opt/pihole/setupLCD.sh /opt/pihole/version.sh
${SUDO} cp /etc/.pihole/pihole /usr/local/bin/pihole
${SUDO} chmod 755 /usr/local/bin/pihole
${SUDO} cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash_completion.d/pihole
@ -811,7 +804,6 @@ installPihole() {
checkForDependencies # done
stopServices
setUser
${SUDO} mkdir -p /etc/pihole/
if [ ! -d "/var/www/html" ]; then
${SUDO} mkdir -p /var/www/html
fi
@ -827,7 +819,6 @@ installPihole() {
getGitFiles
installScripts
installConfigs
installConfigs
CreateLogFile
configureSelinux
installPiholeWeb
@ -844,7 +835,6 @@ updatePihole() {
getGitFiles
installScripts
installConfigs
installConfigs
CreateLogFile
configureSelinux
installPiholeWeb
@ -868,9 +858,9 @@ configureSelinux() {
printf "::: Enabling httpd server side includes (SSI).. "
${SUDO} setsebool -P httpd_ssi_exec on
if [ $? -eq 0 ]; then
echo -n "Success\n"
echo -n "Success"
fi
printf ":::\tCompiling Pi-Hole SELinux policy..\n"
printf "\n:::\tCompiling Pi-Hole SELinux policy..\n"
${SUDO} checkmodule -M -m -o /etc/pihole/pihole.mod /etc/.pihole/advanced/selinux/pihole.te
${SUDO} semodule_package -o /etc/pihole/pihole.pp -m /etc/pihole/pihole.mod
${SUDO} semodule -i /etc/pihole/pihole.pp
@ -935,15 +925,20 @@ if [[ -f ${setupVars} ]];then
fi
# Start the installer
# Verify there is enough disk space for the install
if [ $1 = "--i_do_not_follow_recommendations" ]; then
echo "::: ----i_do_not_follow_recommendations passed to script"
echo "::: skipping free disk space verification!"
else
verifyFreeDiskSpace
fi
# Install packages used by this installation script
installerDependencies
if [[ ${useUpdateVars} == false ]]; then
welcomeDialogs
# Verify there is enough disk space for the install
verifyFreeDiskSpace
${SUDO} mkdir -p /etc/pihole/
# Find IP used to route to outside world
findIPRoute
# Find interfaces and let the user choose one

@ -39,44 +39,26 @@ function helpFunc()
exit 1
}
piholeIPfile=/etc/pihole/piholeIP
piholeIPv6file=/etc/pihole/.useIPv6
adListFile=/etc/pihole/adlists.list
adListDefault=/etc/pihole/adlists.default
whitelistScript=/opt/pihole/whitelist.sh
blacklistScript=/opt/pihole/blacklist.sh
if [[ -f ${piholeIPfile} ]];then
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
piholeIP=$(cat ${piholeIPfile})
#rm $piholeIPfile
else
# Otherwise, the IP address can be taken directly from the machine, which will happen when the script is run by the user and not the installation script
IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1)}')
piholeIPCIDR=$(ip -o -f inet addr show dev "$IPv4dev" | awk '{print $4}' | awk 'END {print}')
piholeIP=${piholeIPCIDR%/*}
fi
if [[ -f ${piholeIPv6file} ]];then
# If the file exists, then the user previously chose to use IPv6 in the automated installer
piholeIPv6=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
fi
#Source the setupVars from install script for the IP
. /etc/pihole/setupVars.conf
#Remove the /* from the end of the IPv4addr.
IPv4addr=${IPv4addr%/*}
# Variables for various stages of downloading and formatting the list
## Nate 3/26/2016 - Commented unused variables
basename=pihole
piholeDir=/etc/${basename}
adList=${piholeDir}/gravity.list
#blacklist=$piholeDir/blacklist.txt
#whitelist=$piholeDir/whitelist.txt
#latentWhitelist=$piholeDir/latentWhitelist.txt
justDomainsExtension=domains
matterandlight=${basename}.0.matterandlight.txt
matterAndLight=${basename}.0.matterandlight.txt
supernova=${basename}.1.supernova.txt
eventHorizon=${basename}.2.eventHorizon.txt
accretionDisc=${basename}.3.accretionDisc.txt
#eyeOfTheNeedle=$basename.4.wormhole.txt
# After setting defaults, check if there's local overrides
if [[ -r ${piholeDir}/pihole.conf ]];then
@ -213,10 +195,10 @@ function gravity_Schwarzchild() {
echo "::: "
# Find all active domains and compile them into one file and remove CRs
echo -n "::: Aggregating list of domains..."
truncate -s 0 ${piholeDir}/${matterandlight}
truncate -s 0 ${piholeDir}/${matterAndLight}
for i in "${activeDomains[@]}"
do
cat "$i" | tr -d '\r' >> ${piholeDir}/${matterandlight}
cat "$i" | tr -d '\r' >> ${piholeDir}/${matterAndLight}
done
echo " done!"
}
@ -264,17 +246,23 @@ function gravity_unique() {
function gravity_hostFormat() {
# Format domain list as "192.168.x.x domain.com"
echo "::: Formatting domains into a HOSTS file..."
hostname=$(</etc/hostname)
if [[ -f /etc/hostname ]]; then
hostname=$(</etc/hostname)
elif [ -x "$(command -v hostname)" ]; then
hostname=$(hostname -f)
else
echo "::: Error: Unable to determine fully qualified domain name of host"
fi
# If there is a value in the $piholeIPv6, then IPv6 will be used, so the awk command modified to create a line for both protocols
if [[ -n ${piholeIPv6} ]];then
# Add hostname and dummy domain to the top of gravity.list to make ping result return a friendlier looking domain! Also allows for an easy way to access the Pi-hole admin console (pi.hole/admin)
echo -e "$piholeIP $hostname\n$piholeIPv6 $hostname\n$piholeIP pi.hole\n$piholeIPv6 pi.hole" > ${piholeDir}/${accretionDisc}
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$piholeIP" -v ipv6addr="$piholeIPv6" '{sub(/\r$/,""); print ipv4addr" "$0"\n"ipv6addr" "$0}' >> ${piholeDir}/${accretionDisc}
echo -e "$IPv4addr $hostname\n$piholeIPv6 $hostname\n$IPv4addr pi.hole\n$piholeIPv6 pi.hole" > ${piholeDir}/${accretionDisc}
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$IPv4addr" -v ipv6addr="$piholeIPv6" '{sub(/\r$/,""); print ipv4addr" "$0"\n"ipv6addr" "$0}' >> ${piholeDir}/${accretionDisc}
else
# Otherwise, just create gravity.list as normal using IPv4
# Add hostname and dummy domain to the top of gravity.list to make ping result return a friendlier looking domain! Also allows for an easy way to access the Pi-hole admin console (pi.hole/admin)
echo -e "$piholeIP $hostname\n$piholeIP pi.hole" > ${piholeDir}/${accretionDisc}
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$piholeIP" '{sub(/\r$/,""); print ipv4addr" "$0}' >> ${piholeDir}/${accretionDisc}
echo -e "$IPv4addr $hostname\n$IPv4addr pi.hole" > ${piholeDir}/${accretionDisc}
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$IPv4addr" '{sub(/\r$/,""); print ipv4addr" "$0}' >> ${piholeDir}/${accretionDisc}
fi
# Copy the file over as /etc/pihole/gravity.list so dnsmasq can use it
@ -301,7 +289,10 @@ function gravity_advanced() {
# This helps with that and makes it easier to read
# It also helps with debugging so each stage of the script can be researched more in depth
echo -n "::: Formatting list of domains to remove comments...."
awk '($1 !~ /^#/) { if (NF>1) {print $2} else {print $1}}' ${piholeDir}/${matterandlight} | sed -nr -e 's/\.{2,}/./g' -e '/\./p' > ${piholeDir}/${supernova}
#awk '($1 !~ /^#/) { if (NF>1) {print $2} else {print $1}}' ${piholeDir}/${matterAndLight} | sed -nr -e 's/\.{2,}/./g' -e '/\./p' > ${piholeDir}/${supernova}
#Above line does not correctly grab domains where comment is on the same line (e.g 'addomain.com #comment')
#Add additional awk command to read all lines up to a '#', and then continue as we were
cat ${piholeDir}/${matterAndLight} | awk -F'#' '{print $1}' | awk '($1 !~ /^#/) { if (NF>1) {print $2} else {print $1}}' | sed -nr -e 's/\.{2,}/./g' -e '/\./p' > ${piholeDir}/${supernova}
echo " done!"
numberOf=$(wc -l < ${piholeDir}/${supernova})
@ -349,14 +340,13 @@ do
esac
done
#Overwrite adlists.default from /etc/.pihole in case any changes have been made. Changes should be saved in /etc/adlists.list
if [[ ${forceGrav} == true ]]; then
echo -n "::: Deleting exising list cache..."
${SUDO} rm /etc/pihole/list.*
echo " done!"
fi
#Overwrite adlists.default from /etc/.pihole in case any changes have been made. Changes should be saved in /etc/adlists.list
${SUDO} cp /etc/.pihole/adlists.default /etc/pihole/adlists.default
gravity_collapse
gravity_spinup

@ -47,16 +47,72 @@ function flushFunc {
exit 1
}
function updateDashboardFunc {
${SUDO} /opt/pihole/updateDashboard.sh
exit 1
}
function updatePiholeFunc {
echo "::: Fetching latest changes from Github..."
cd /etc/.pihole
${SUDO} git pull
${SUDO} /etc/.pihole/automated\ install/basic-install.sh pihole
if [ ! -d "/etc/.pihole" ]; then #This is unlikely
echo "::: Critical Error: Pi-Hole repo missing from system!"
echo "::: Please re-run install script from https://github.com/pi-hole/pi-hole"
exit 1;
fi
if [ ! -d "/var/www/html/admin" ]; then #This is unlikely
echo "::: Critical Error: Pi-Hole repo missing from system!"
echo "::: Please re-run install script from https://github.com/pi-hole/pi-hole"
exit 1;
fi
echo "::: Checking for updates..."
piholeVersion=$(cd /etc/.pihole/ && git describe --tags --abbrev=0)
piholeVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/pi-hole/releases/latest | grep -Po '"tag_name":.*?[^\\]",' | perl -pe 's/"tag_name": "//; s/^"//; s/",$//')
webVersion=$(cd /var/www/html/admin/ && git describe --tags --abbrev=0)
webVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/AdminLTE/releases/latest | grep -Po '"tag_name":.*?[^\\]",' | perl -pe 's/"tag_name": "//; s/^"//; s/",$//')
echo "::: Pi-hole version is $piholeVersion (Latest version is $piholeVersionLatest)"
echo "::: Web Admin version is $webVersion (Latest version is $webVersionLatest)"
echo ":::"
if [[ ${piholeVersion} == ${piholeVersionLatest} ]] ; then
echo "::: Pi-hole Base files are already up to date! Version: ${piholeVersionLatest}"
echo "::: No need to update!"
echo ":::"
if [[ ${webVersion} == ${webVersionLatest} ]] ; then
echo "::: Web Admin files are already up to date!"
echo "::: No need to update!"
echo ":::"
else
echo "::: An Update is available for the Web Admin!"
echo ":::"
echo "::: Fetching latest changes from GitHub..."
cd /var/www/html/admin
${SUDO} git pull origin master
echo ":::"
echo "::: Pi-hole Web Admin has been updated to ${webVersion}"
echo "::: See https://changes.pi-hole.net for details"
fi
else
echo -n "::: An update is available for "
if [[ ${webVersion} == ${webVersionLatest} ]] ; then
echo " Pi-Hole!"
else
echo " Pi-Hole base files and the Web Admin. Both will be updated!"
fi
echo "::: Fetching latest changes from GitHub..."
cd /etc/.pihole
${SUDO} git pull origin master
${SUDO} /etc/.pihole/automated\ install/basic-install.sh pihole
echo ":::"
echo "::: Pi-hole has been updated to version ${piholeVersionLatest}"
if [[ ${webVersion} != ${webVersionLatest} ]] ; then
echo "::: Web Admin has been updated to version ${webVersionLatest}"
fi
echo ":::"
echo "::: See https://changes.pi-hole.net for details"
fi
exit 1
}
@ -112,8 +168,7 @@ function helpFunc {
echo "::: -b, blacklist Blacklist domains"
echo "::: -d, debug Start a debugging session if having trouble"
echo "::: -f, flush Flush the pihole.log file"
echo "::: -ud, updateDashboard Update the web dashboard manually"
echo "::: -up, updatePihole Update Pi-hole"
echo "::: -up, updatePihole Update Pi-hole"
echo "::: -g, updateGravity Update the list of ad-serving domains"
echo "::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it"
echo "::: -c, chronometer Calculates stats and displays to an LCD"
@ -134,7 +189,6 @@ case "$1" in
"-b" | "blacklist" ) blacklistFunc "$@";;
"-d" | "debug" ) debugFunc;;
"-f" | "flush" ) flushFunc;;
"-ud" | "updateDashboard" ) updateDashboardFunc;;
"-up" | "updatePihole" ) updatePiholeFunc;;
"-g" | "updateGravity" ) updateGravityFunc "$@";;
"-s" | "setupLCD" ) setupLCDFunction;;

Loading…
Cancel
Save