Merge branch 'development' into tweak/block-page-no-password

This commit is contained in:
Mcat12 2018-02-11 13:49:36 -05:00
commit 55e50eced6
No known key found for this signature in database
GPG key ID: ABB8FC9789AF524D
2 changed files with 8 additions and 8 deletions

View file

@ -23,7 +23,7 @@ set -e
######## VARIABLES ######### ######## VARIABLES #########
# For better maintainability, we store as much information that can change in variables # For better maintainability, we store as much information that can change in variables
# This allows us to make a change in one place that can propogate to all instances of the variable # This allows us to make a change in one place that can propagate to all instances of the variable
# These variables should all be GLOBAL variables, written in CAPS # These variables should all be GLOBAL variables, written in CAPS
# Local variables will be in lowercase and will exist only within functions # Local variables will be in lowercase and will exist only within functions
# It's still a work in progress, so you may see some variance in this guideline until it is complete # It's still a work in progress, so you may see some variance in this guideline until it is complete
@ -43,7 +43,7 @@ webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
webInterfaceDir="/var/www/html/admin" webInterfaceDir="/var/www/html/admin"
piholeGitUrl="https://github.com/pi-hole/pi-hole.git" piholeGitUrl="https://github.com/pi-hole/pi-hole.git"
PI_HOLE_LOCAL_REPO="/etc/.pihole" PI_HOLE_LOCAL_REPO="/etc/.pihole"
# These are the names of piholes files, stored in an array # These are the names of pi-holes files, stored in an array
PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage) PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
# This folder is where the Pi-hole scripts will be installed # This folder is where the Pi-hole scripts will be installed
PI_HOLE_INSTALL_DIR="/opt/pihole" PI_HOLE_INSTALL_DIR="/opt/pihole"
@ -81,7 +81,7 @@ runUnattended=false
if [[ -f "${coltable}" ]]; then if [[ -f "${coltable}" ]]; then
# source it # source it
source ${coltable} source ${coltable}
# Othwerise, # Otherwise,
else else
# Set these values so the installer can still run in color # Set these values so the installer can still run in color
COL_NC='\e[0m' # No Color COL_NC='\e[0m' # No Color
@ -918,7 +918,7 @@ setLogging() {
esac esac
} }
# Funtion to ask the user if they want to install the dashboard # Function to ask the user if they want to install the dashboard
setAdminFlag() { setAdminFlag() {
# Local, named variables # Local, named variables
local WebToggleCommand local WebToggleCommand
@ -946,7 +946,7 @@ setAdminFlag() {
esac esac
} }
# Check if /etc/dnsmasq.conf is from pihole. If so replace with an original and install new in .d directory # Check if /etc/dnsmasq.conf is from pi-hole. If so replace with an original and install new in .d directory
version_check_dnsmasq() { version_check_dnsmasq() {
# Local, named variables # Local, named variables
local dnsmasq_conf="/etc/dnsmasq.conf" local dnsmasq_conf="/etc/dnsmasq.conf"
@ -1929,7 +1929,7 @@ main() {
# They do not have enough privileges, so let the user know # They do not have enough privileges, so let the user know
echo -e " ${CROSS} ${str} echo -e " ${CROSS} ${str}
${COL_LIGHT_RED}Script called with non-root privileges${COL_NC} ${COL_LIGHT_RED}Script called with non-root privileges${COL_NC}
The Pi-hole requires elevated privleges to install and run The Pi-hole requires elevated privileges to install and run
Please check the installer for any concerns regarding this requirement Please check the installer for any concerns regarding this requirement
Make sure to download this script from a trusted source\\n" Make sure to download this script from a trusted source\\n"
echo -ne " ${INFO} Sudo utility check" echo -ne " ${INFO} Sudo utility check"

View file

@ -330,7 +330,7 @@ gravity_ParseFileIntoDomains() {
}' "${source}" > "${destination}.exceptionsFile.tmp" }' "${source}" > "${destination}.exceptionsFile.tmp"
# Remove exceptions # Remove exceptions
grep -F -x -v -f "${destination}.exceptionsFile.tmp" "${destination}" > "${source}" comm -23 "${destination}" <(sort "${destination}.exceptionsFile.tmp") > "${source}"
mv "${source}" "${destination}" mv "${source}" "${destination}"
fi fi
@ -449,7 +449,7 @@ gravity_Whitelist() {
echo -ne " ${INFO} ${str}..." echo -ne " ${INFO} ${str}..."
# Print everything from preEventHorizon into whitelistMatter EXCEPT domains in $whitelistFile # Print everything from preEventHorizon into whitelistMatter EXCEPT domains in $whitelistFile
grep -F -x -v -f "${whitelistFile}" "${piholeDir}/${preEventHorizon}" > "${piholeDir}/${whitelistMatter}" comm -23 "${piholeDir}/${preEventHorizon}" <(sort "${whitelistFile}") > "${piholeDir}/${whitelistMatter}"
echo -e "${OVER} ${INFO} ${str}" echo -e "${OVER} ${INFO} ${str}"
} }