mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge branch 'development' into bugfix/dhcpcd_comments
This commit is contained in:
commit
73645f299a
2 changed files with 16 additions and 9 deletions
|
@ -10,9 +10,6 @@
|
||||||
# the Free Software Foundation, either version 2 of the License, or
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# Nate Brandeburg
|
|
||||||
# nate@ubiquisoft.com
|
|
||||||
# 3/24/2016
|
|
||||||
|
|
||||||
######## GLOBAL VARS ########
|
######## GLOBAL VARS ########
|
||||||
DEBUG_LOG="/var/log/pihole_debug.log"
|
DEBUG_LOG="/var/log/pihole_debug.log"
|
||||||
|
@ -67,6 +64,15 @@ function versionCheck {
|
||||||
echo >> $DEBUG_LOG
|
echo >> $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 compareWhitelist {
|
function compareWhitelist {
|
||||||
if [ ! -f "$WHITELISTMATCHES" ]; then
|
if [ ! -f "$WHITELISTMATCHES" ]; then
|
||||||
$SUDO touch $WHITELISTMATCHES
|
$SUDO touch $WHITELISTMATCHES
|
||||||
|
@ -195,6 +201,7 @@ echo "$GATEWAY_CHECK" >> $DEBUG_LOG
|
||||||
echo >> $DEBUG_LOG
|
echo >> $DEBUG_LOG
|
||||||
|
|
||||||
versionCheck
|
versionCheck
|
||||||
|
distroCheck
|
||||||
compareWhitelist
|
compareWhitelist
|
||||||
compareBlacklist
|
compareBlacklist
|
||||||
testNslookup
|
testNslookup
|
||||||
|
@ -331,12 +338,12 @@ function dumpPiHoleLog {
|
||||||
# Anything to be done after capturing of pihole.log terminates
|
# Anything to be done after capturing of pihole.log terminates
|
||||||
function finalWork {
|
function finalWork {
|
||||||
echo "::: Finshed debugging!"
|
echo "::: Finshed debugging!"
|
||||||
SPRUNGE=$(cat /var/log/pihole_debug.log | curl --silent --connect-timeout 5 -F 'sprunge=<-' http://sprunge.us)
|
TERMBIN=$(cat /var/log/pihole_debug.log | nc termbin.com 9999)
|
||||||
|
|
||||||
# Check if sprunge.us is reachable. When it's not, point to local log instead
|
# Check if termbin.com is reachable. When it's not, point to local log instead
|
||||||
if [ -n "$SPRUNGE" ]
|
if [ -n "$TERMBIN" ]
|
||||||
then
|
then
|
||||||
echo "::: Debug log can be found at : $SPRUNGE"
|
echo "::: Debug log can be found at : $TERMBIN"
|
||||||
else
|
else
|
||||||
echo "::: Debug log can be found at : /var/log/pihole_debug.log"
|
echo "::: Debug log can be found at : /var/log/pihole_debug.log"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -67,7 +67,7 @@ if [ -x "$(command -v rpm)" ];then
|
||||||
PKG_INSTALL="$PKG_MANAGER install -y"
|
PKG_INSTALL="$PKG_MANAGER install -y"
|
||||||
PKG_COUNT="$PKG_MANAGER check-update | grep -v ^Last | grep -c ^[a-zA-Z0-9]"
|
PKG_COUNT="$PKG_MANAGER check-update | grep -v ^Last | grep -c ^[a-zA-Z0-9]"
|
||||||
INSTALLER_DEPS=( iproute net-tools procps-ng newt )
|
INSTALLER_DEPS=( iproute net-tools procps-ng newt )
|
||||||
PIHOLE_DEPS=( epel-release bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-cli php git curl unzip wget findutils cronie sudo )
|
PIHOLE_DEPS=( epel-release bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-cli php git curl unzip wget findutils cronie sudo netcat )
|
||||||
LIGHTTPD_USER="lighttpd"
|
LIGHTTPD_USER="lighttpd"
|
||||||
LIGHTTPD_GROUP="lighttpd"
|
LIGHTTPD_GROUP="lighttpd"
|
||||||
LIGHTTPD_CFG="lighttpd.conf.fedora"
|
LIGHTTPD_CFG="lighttpd.conf.fedora"
|
||||||
|
@ -83,7 +83,7 @@ elif [ -x "$(command -v apt-get)" ];then
|
||||||
PKG_INSTALL="$PKG_MANAGER --yes --quiet install"
|
PKG_INSTALL="$PKG_MANAGER --yes --quiet install"
|
||||||
PKG_COUNT="$PKG_MANAGER -s -o Debug::NoLocking=true upgrade | grep -c ^Inst"
|
PKG_COUNT="$PKG_MANAGER -s -o Debug::NoLocking=true upgrade | grep -c ^Inst"
|
||||||
INSTALLER_DEPS=( apt-utils whiptail dhcpcd5)
|
INSTALLER_DEPS=( apt-utils whiptail dhcpcd5)
|
||||||
PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget sudo )
|
PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget sudo netcat )
|
||||||
LIGHTTPD_USER="www-data"
|
LIGHTTPD_USER="www-data"
|
||||||
LIGHTTPD_GROUP="www-data"
|
LIGHTTPD_GROUP="www-data"
|
||||||
LIGHTTPD_CFG="lighttpd.conf.debian"
|
LIGHTTPD_CFG="lighttpd.conf.debian"
|
||||||
|
|
Loading…
Reference in a new issue