From 876170767c72d3db9b319214593d0a8921773a78 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 13 Jan 2018 16:43:20 +0000 Subject: [PATCH 1/4] Print actual domain instead of grep output of "Binary file /etc/pihole/list.preEventHorizon matches" when a domain with a unicode char is in a source list. Signed-off-by: Adam Warner --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 40debd61..536cad27 100755 --- a/gravity.sh +++ b/gravity.sh @@ -449,7 +449,7 @@ gravity_Whitelist() { echo -ne " ${INFO} ${str}..." # 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}" } From 2b6d9c34c9f0150f1ddef271b91b6c392a50e7bc Mon Sep 17 00:00:00 2001 From: Elias Ojala Date: Sat, 27 Jan 2018 14:36:11 +0200 Subject: [PATCH 2/4] Fixed a typo Signed-off-by: Elias Ojala --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 550f26ad..c87d00a6 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1929,7 +1929,7 @@ main() { # They do not have enough privileges, so let the user know echo -e " ${CROSS} ${str} ${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 Make sure to download this script from a trusted source\\n" echo -ne " ${INFO} Sudo utility check" From 55e10d8287df8721a325d42761c9a04823c0b9db Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 28 Jan 2018 00:50:15 +0000 Subject: [PATCH 3/4] replace another grep -F as pointed out by @StarPicard Signed-off-by: Adam Warner --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 536cad27..d83d271a 100755 --- a/gravity.sh +++ b/gravity.sh @@ -330,7 +330,7 @@ gravity_ParseFileIntoDomains() { }' "${source}" > "${destination}.exceptionsFile.tmp" # Remove exceptions - grep -F -x -v -f "${destination}.exceptionsFile.tmp" "${destination}" > "${source}" + comm -23 "${destination}" <(sort "${destination}.exceptionsFile.tmp") > "${source}" mv "${source}" "${destination}" fi From c5a2ca5c98d9f40990768f73439d4700261cd989 Mon Sep 17 00:00:00 2001 From: Sebastian Pucilowski Date: Wed, 7 Feb 2018 16:45:23 +1100 Subject: [PATCH 4/4] Trivial spelling mistakes in basic-install.sh comments Signed-off-by: Sebastian Pucilowski --- automated install/basic-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c87d00a6..81209037 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -23,7 +23,7 @@ set -e ######## 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 # 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 @@ -43,7 +43,7 @@ webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git" webInterfaceDir="/var/www/html/admin" piholeGitUrl="https://github.com/pi-hole/pi-hole.git" 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) # This folder is where the Pi-hole scripts will be installed PI_HOLE_INSTALL_DIR="/opt/pihole" @@ -81,7 +81,7 @@ runUnattended=false if [[ -f "${coltable}" ]]; then # source it source ${coltable} -# Othwerise, +# Otherwise, else # Set these values so the installer can still run in color COL_NC='\e[0m' # No Color @@ -918,7 +918,7 @@ setLogging() { 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() { # Local, named variables local WebToggleCommand @@ -946,7 +946,7 @@ setAdminFlag() { 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() { # Local, named variables local dnsmasq_conf="/etc/dnsmasq.conf"