From 512ec7fb8709aabb818a27d2d1390518c346eb6c Mon Sep 17 00:00:00 2001
From: Riley Avron
Date: Tue, 6 Mar 2018 21:44:29 -0800
Subject: [PATCH 01/21] Remove unneeded ifs in awk
Signed-off-by: Riley Avron
---
gravity.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/gravity.sh b/gravity.sh
index 395ea548..f1af8d9e 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -345,13 +345,14 @@ gravity_ParseFileIntoDomains() {
# Scanning for "^IPv4$" is too slow with large (1M) lists on low-end hardware
echo -ne " ${INFO} Format: URL"
- awk '{
+ awk '
# Remove URL protocol, optional "username:password@", and ":?/;"
- if ($0 ~ /[:?\/;]/) { gsub(/(^.*:\/\/(.*:.*@)?|[:?\/;].*)/, "", $0) }
- # Remove lines which are only IPv4 addresses
- if ($0 ~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) { $0="" }
- if ($0) { print $0 }
- }' "${source}" 2> /dev/null > "${destination}"
+ /[:?\/;]/ { gsub(/(^.*:\/\/(.*:.*@)?|[:?\/;].*)/, "", $0) }
+ # Skip lines which are only IPv4 addresses
+ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/ { next }
+ # Print if nonempty
+ length { print $0 }
+ ' "${source}" 2> /dev/null > "${destination}"
echo -e "${OVER} ${TICK} Format: URL"
else
From f390671018b46c9e60ca99bb6810ea43dfb6a9fc Mon Sep 17 00:00:00 2001
From: Riley Avron
Date: Tue, 6 Mar 2018 21:48:12 -0800
Subject: [PATCH 02/21] Improve scheme matching to avoid inadvertent blocking
Signed-off-by: Riley Avron
---
gravity.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gravity.sh b/gravity.sh
index f1af8d9e..011d2f8c 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -346,12 +346,16 @@ gravity_ParseFileIntoDomains() {
echo -ne " ${INFO} Format: URL"
awk '
- # Remove URL protocol, optional "username:password@", and ":?/;"
- /[:?\/;]/ { gsub(/(^.*:\/\/(.*:.*@)?|[:?\/;].*)/, "", $0) }
+ # Remove URL scheme, optional "username:password@", and ":?/;"
+ # The scheme must be matched carefully to avoid blocking the wrong URL
+ # in cases like:
+ # http://www.evil.com?http://www.good.com
+ # See RFC 3986 section 3.1 for details.
+ /[:?\/;]/ { gsub(/(^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(.*:.*@)?|[:?\/;].*)/, "", $0) }
# Skip lines which are only IPv4 addresses
/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/ { next }
# Print if nonempty
- length { print $0 }
+ length { print }
' "${source}" 2> /dev/null > "${destination}"
echo -e "${OVER} ${TICK} Format: URL"
From 11f342587656937f0baa8960cbd785994ceeaaec Mon Sep 17 00:00:00 2001
From: Jacob Salmela
Date: Thu, 22 Mar 2018 23:51:12 -0500
Subject: [PATCH 03/21] update donation and affiliate links. also link to
trademark guidelines. update an image. and add a project.
Signed-off-by: Jacob Salmela
---
README.md | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index b7f4f249..b5e24378 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
Network-wide ad blocking via your own Linux hardware
-The Pi-hole is a [DNS sinkhole](https://en.wikipedia.org/wiki/DNS_Sinkhole) that protects your devices from unwanted content, without installing any client-side software.
+The Pi-hole[®](https://pi-hole.net/trademark-rules-and-brand-guidelines/) is a [DNS sinkhole](https://en.wikipedia.org/wiki/DNS_Sinkhole) that protects your devices from unwanted content, without installing any client-side software.
- **Easy-to-install**: our versatile installer walks you through the process, and [takes less than ten minutes](https://www.youtube.com/watch?v=vKWjx1AQYgs)
- **Resolute**: content is blocked in _non-browser locations_, such as ad-laden mobile apps and smart TVs
@@ -27,7 +27,7 @@ Those who want to get started quickly and conveniently, may install Pi-hole usin
#### `curl -sSL https://install.pi-hole.net | bash`
## Alternative Install Methods
-[Piping to `bash` is controversial](https://pi-hole.net/2016/07/25/curling-and-piping-to-bash), as it prevents you from [reading code that is about to run](https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh) on your system. Therefore, we provide these alternative installation methods which allow code review before installation:
+[Piping to `bash` is controversial](https://pi-hole.net/2016/07/25/curling-and-piping-to-bash), as it prevents you from [reading code that is about to run](https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh) on your system. Therefore, we provide these alternative installation methods which allow code review before installation:
### Method 1: Clone our repository and run
```
@@ -60,16 +60,21 @@ Make no mistake: **your support is absolutely vital to help keep us innovating!*
### Donations
Sending a donation using our links below is **extremely helpful** in offsetting a portion of our monthly expenses:
- Donate via PayPal
- Bitcoin Address: 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL
+- Donate via PayPal
+- [Bitcoin](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL
+- [Bitcoin Cash](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): qqh25hlmqaj99xraw00e47xmf8sysnyxhyww2d7dnh
+- [Ethereum](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): 0xF00aF43d2431BAD585056492b310e48eC40D87e8
### Alternative support
-If you'd rather not donate (_which is okay!_), there are other ways you can help support us:
+If you'd rather not [donate](https://pi-hole.net/donate/) (_which is okay!_), there are other ways you can help support us:
-- [Digital Ocean](http://www.digitalocean.com/?refcode=344d234950e1) affiliate link
-- [Vultr](http://www.vultr.com/?ref=7190426) affiliate link
-- [UNIXstickers.com](http://unixstickers.refr.cc/jacobs) affiliate link
-- [Pi-hole Swag Store](https://pi-hole.net/shop/)
+- [Digital Ocean](http://www.digitalocean.com/?refcode=344d234950e1) _affiliate link_
+- [UNIXstickers.com](http://unixstickers.refr.cc/jacobs) _save $5 when you spend $9 using our affiliate link_
+- [Pi-hole Swag Store](https://pi-hole.net/shop/) _affiliate link_
+- [Amazon](http://www.amazon.com/exec/obidos/redirect-home/pihole09-20) _affiliate link_
+- [Ho-ost](https://clients.ho-ost.com/aff.php?aff=19) _save 50% with our affiliate link_
+- [DNS Made Easy](https://cp.dnsmadeeasy.com/u/133706) _affiliate link_
+- [Vultr](http://www.vultr.com/?ref=7190426) _affiliate link_
- Spreading the word about our software, and how you have benefited from it
### Contributing via GitHub
@@ -127,7 +132,7 @@ You can read our [Core Feature Breakdown](https://github.com/pi-hole/pi-hole/wik
### The Web Interface Dashboard
This [optional dashboard](https://github.com/pi-hole/AdminLTE) allows you to view stats, change settings, and configure your Pi-hole. It's the power of the Command Line Interface, with none of the learning curve!
-
+
Some notable features include:
* Mobile friendly interface
@@ -145,8 +150,8 @@ There are several ways to [access the dashboard](https://discourse.pi-hole.net/t
2. `http:/pi.hole/admin/` (when using Pi-hole as your DNS server)
3. `http://pi.hole/` (when using Pi-hole as your DNS server)
-## The Faster-Than-Light Engine
-The [FTL Engine](https://github.com/pi-hole/FTL) is a lightweight, purpose-built daemon used to provide statistics needed for the Web Interface, and its API can be easily integrated into your own projects. As the name implies, FTL does this all *very quickly*!
+## Faster-than-light Engine
+The FTLDNS[™](https://pi-hole.net/trademark-rules-and-brand-guidelines/) is a lightweight, purpose-built daemon used to provide statistics needed for the Web Interface, and its API can be easily integrated into your own projects. As the name implies, FTLDNS does this all *very quickly*!
Some of the statistics you can integrate include:
* Total number of domains being blocked
@@ -194,6 +199,7 @@ While quite outdated at this point, [this original blog post about Pi-hole](http
- [Magic Mirror with DNS Filtering](https://zonksec.com/blog/magic-mirror-dns-filtering/#dnssoftware)
- [Pi-hole Droid: Android client](https://github.com/friimaind/pi-hole-droid)
- [Windows DNS Swapper](https://github.com/roots84/DNS-Swapper), see [#1400](https://github.com/pi-hole/pi-hole/issues/1400)
+- [Pi-hole Visualizer](https://www.reddit.com/r/pihole/comments/82ikgb/pihole_visualizer_update/)
-----
## Coverage
From 284f9e3f2f9141e2a7a16b252abd447217b824d6 Mon Sep 17 00:00:00 2001
From: Jacob Salmela
Date: Wed, 11 Apr 2018 20:38:56 -0500
Subject: [PATCH 04/21] implement mcats request. removed 'the'
Signed-off-by: Jacob Salmela
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b5e24378..ceeadb30 100644
--- a/README.md
+++ b/README.md
@@ -151,7 +151,7 @@ There are several ways to [access the dashboard](https://discourse.pi-hole.net/t
3. `http://pi.hole/` (when using Pi-hole as your DNS server)
## Faster-than-light Engine
-The FTLDNS[™](https://pi-hole.net/trademark-rules-and-brand-guidelines/) is a lightweight, purpose-built daemon used to provide statistics needed for the Web Interface, and its API can be easily integrated into your own projects. As the name implies, FTLDNS does this all *very quickly*!
+FTLDNS[™](https://pi-hole.net/trademark-rules-and-brand-guidelines/) is a lightweight, purpose-built daemon used to provide statistics needed for the Web Interface, and its API can be easily integrated into your own projects. As the name implies, FTLDNS does this all *very quickly*!
Some of the statistics you can integrate include:
* Total number of domains being blocked
From 8e82bf69d8b60dd784fe9f72fba3c1f4d6d149bd Mon Sep 17 00:00:00 2001
From: Jacob Salmela
Date: Wed, 11 Apr 2018 20:40:35 -0500
Subject: [PATCH 05/21] update wallet addresses
Signed-off-by: Jacob Salmela
---
README.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index ceeadb30..5119fd8c 100644
--- a/README.md
+++ b/README.md
@@ -61,9 +61,10 @@ Make no mistake: **your support is absolutely vital to help keep us innovating!*
Sending a donation using our links below is **extremely helpful** in offsetting a portion of our monthly expenses:
- Donate via PayPal
-- [Bitcoin](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL
-- [Bitcoin Cash](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): qqh25hlmqaj99xraw00e47xmf8sysnyxhyww2d7dnh
-- [Ethereum](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): 0xF00aF43d2431BAD585056492b310e48eC40D87e8
+- [Bitcoin](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763):
+3MDPzjXu2hjw5sGLJvKUi1uXbvQPzVrbpF
+- [Bitcoin Cash](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): qzqsz4aju2eecc6uhs7tus4vlwhhela24sdruf4qp5
+- [Ethereum](https://commerce.coinbase.com/checkout/fb7facaf-bebd-46be-bb77-b358f4546763): 0x79d4e90A4a0C732819526c93e21A3F1356A2FAe1
### Alternative support
If you'd rather not [donate](https://pi-hole.net/donate/) (_which is okay!_), there are other ways you can help support us:
From 3a483a1b203d4f4bc2a913d97c9a33562cc2e7cf Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Sun, 15 Apr 2018 02:08:16 +0100
Subject: [PATCH 06/21] install_web_server
+ Splits web interface and server into two variables.
+ Option to disable forced install of Lighttpd.
---
advanced/Scripts/piholeCheckout.sh | 2 +-
advanced/Scripts/update.sh | 4 +-
automated install/basic-install.sh | 119 +++++++++++++++--------------
automated install/uninstall.sh | 9 +--
4 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh
index 21919ddf..e7bc244e 100644
--- a/advanced/Scripts/piholeCheckout.sh
+++ b/advanced/Scripts/piholeCheckout.sh
@@ -222,7 +222,7 @@ checkout() {
Please re-run install script from https://github.com/pi-hole/pi-hole${COL_NC}"
exit 1;
fi
- if [[ "${INSTALL_WEB}" == "true" ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == "true" ]]; then
if ! is_repo "${webInterfaceDir}" ; then
echo -e " ${COL_LIGHT_RED}Error: Web Admin repo is missing from system!
Please re-run install script from https://github.com/pi-hole/pi-hole${COL_NC}"
diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh
index a4ada4c8..c8a2bffb 100755
--- a/advanced/Scripts/update.sh
+++ b/advanced/Scripts/update.sh
@@ -94,7 +94,7 @@ main() {
local pihole_version_current
local web_version_current
local basicError="\\n ${COL_LIGHT_RED}Unable to complete update, please contact Pi-hole Support${COL_NC}"
-
+
# shellcheck disable=1090,2154
source "${setupVars}"
@@ -133,7 +133,7 @@ main() {
echo ""
fi
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
if ! is_repo "${ADMIN_INTERFACE_DIR}" ; then
echo -e "\\n ${COL_LIGHT_RED}Error: Web Admin repo is missing from system!
Please re-run install script from https://pi-hole.net${COL_NC}"
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index f786d703..79fe17bf 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -55,7 +55,7 @@ IPV4_ADDRESS=""
IPV6_ADDRESS=""
# By default, query logging is enabled and the dashboard is set to be installed
QUERY_LOGGING=true
-INSTALL_WEB=true
+INSTALL_WEB_INTERFACE=true
# Find the rows and columns will default to 80x24 if it can not be detected
@@ -76,6 +76,16 @@ c=$(( c < 70 ? 70 : c ))
skipSpaceCheck=false
reconfigure=false
runUnattended=false
+INSTALL_WEB_SERVER=true
+# Check arguments for the undocumented flags
+for var in "$@"; do
+ case "$var" in
+ "--reconfigure" ) reconfigure=true;;
+ "--i_do_not_follow_recommendations" ) skipSpaceCheck=true;;
+ "--unattended" ) runUnattended=true;;
+ "--disable-install-webserver" ) INSTALL_WEB_SERVER=false;;
+ esac
+done
# If the color table file exists,
if [[ -f "${coltable}" ]]; then
@@ -948,12 +958,13 @@ setAdminFlag() {
"On (Recommended)")
echo -e " ${INFO} Web Interface On"
# Set it to true
- INSTALL_WEB=true
+ INSTALL_WEB_INTERFACE=true
;;
Off)
echo -e " ${INFO} Web Interface Off"
# or false
- INSTALL_WEB=false
+ INSTALL_WEB_INTERFACE=false
+ INSTALL_WEB_SERVER=false
;;
esac
}
@@ -1092,7 +1103,7 @@ installConfigs() {
version_check_dnsmasq
# If the user chose to install the dashboard,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
# and if the Web server conf directory does not exist,
if [[ ! -d "/etc/lighttpd" ]]; then
# make it
@@ -1455,7 +1466,7 @@ configureFirewall() {
#
finalExports() {
# If the Web interface is not set to be installed,
- if [[ "${INSTALL_WEB}" == false ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == false ]]; then
# and if there is not an IPv4 address,
if [[ "${IPV4_ADDRESS}" ]]; then
# there is no block page, so set IPv4 to 0.0.0.0 (all IP addresses)
@@ -1470,7 +1481,7 @@ finalExports() {
# If the setup variable file exists,
if [[ -e "${setupVars}" ]]; then
# update the variables in the file
- sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
+ sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
fi
# echo the information to the user
{
@@ -1480,7 +1491,8 @@ finalExports() {
echo "PIHOLE_DNS_1=${PIHOLE_DNS_1}"
echo "PIHOLE_DNS_2=${PIHOLE_DNS_2}"
echo "QUERY_LOGGING=${QUERY_LOGGING}"
- echo "INSTALL_WEB=${INSTALL_WEB}"
+ echo "INSTALL_WEB_SERVER=${INSTALL_WEB_SERVER}"
+ echo "INSTALL_WEB_INTERFACE=${INSTALL_WEB_INTERFACE}"
echo "LIGHTTPD_ENABLED=${LIGHTTPD_ENABLED}"
}>> "${setupVars}"
@@ -1524,25 +1536,28 @@ installPihole() {
create_pihole_user
# If the user wants to install the Web interface,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
if [[ ! -d "/var/www/html" ]]; then
# make the Web directory if necessary
mkdir -p /var/www/html
fi
- # Set the owner and permissions
- chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html
- chmod 775 /var/www/html
- # Give pihole access to the Web server group
- usermod -a -G ${LIGHTTPD_GROUP} pihole
- # If the lighttpd command is executable,
- if [[ -x "$(command -v lighty-enable-mod)" ]]; then
- # enable fastcgi and fastcgi-php
- lighty-enable-mod fastcgi fastcgi-php > /dev/null || true
- else
- # Othweise, show info about installing them
- echo -e " ${INFO} Warning: 'lighty-enable-mod' utility not found
- Please ensure fastcgi is enabled if you experience issues\\n"
- fi
+
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
+ # Set the owner and permissions
+ chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html
+ chmod 775 /var/www/html
+ # Give pihole access to the Web server group
+ usermod -a -G ${LIGHTTPD_GROUP} pihole
+ # If the lighttpd command is executable,
+ if [[ -x "$(command -v lighty-enable-mod)" ]]; then
+ # enable fastcgi and fastcgi-php
+ lighty-enable-mod fastcgi fastcgi-php > /dev/null || true
+ else
+ # Othweise, show info about installing them
+ echo -e " ${INFO} Warning: 'lighty-enable-mod' utility not found
+ Please ensure fastcgi is enabled if you experience issues\\n"
+ fi
+ fi
fi
# Install scripts,
installScripts
@@ -1551,7 +1566,7 @@ installPihole() {
# and create the log file
CreateLogFile
# If the user wants to install the dashboard,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# do so
installPiholeWeb
fi
@@ -1589,7 +1604,7 @@ updatePihole() {
# Create the log file
CreateLogFile
# If the user wants to install the dasboard,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# do so
installPiholeWeb
fi
@@ -1639,7 +1654,7 @@ displayFinalMessage() {
pwstring="NOT SET"
fi
# If the user wants to install the dashboard,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# Store a message in a variable and display it
additional="View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin
@@ -1707,7 +1722,7 @@ clone_or_update_repos() {
exit 1; \
}
# If the Web interface was installed,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# reset it's repo
resetRepo ${webInterfaceDir} || \
{ echo -e " ${COL_LIGHT_RED}Unable to reset ${webInterfaceDir}, exiting installer${COL_NC}"; \
@@ -1722,7 +1737,7 @@ clone_or_update_repos() {
exit 1; \
}
# If the Web interface was installed,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# get the Web git files
getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl} || \
{ echo -e " ${COL_LIGHT_RED}Unable to clone ${webInterfaceGitUrl} into ${webInterfaceDir}, exiting installer${COL_NC}"; \
@@ -1950,15 +1965,6 @@ main() {
# Check for supported distribution
distro_check
- # Check arguments for the undocumented flags
- for var in "$@"; do
- case "$var" in
- "--reconfigure" ) reconfigure=true;;
- "--i_do_not_follow_recommendations" ) skipSpaceCheck=true;;
- "--unattended" ) runUnattended=true;;
- esac
- done
-
# If the setup variable file exists,
if [[ -f "${setupVars}" ]]; then
# if it's running unattended,
@@ -2000,7 +2006,7 @@ main() {
mkdir -p /etc/pihole/
stop_service dnsmasq
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
stop_service lighttpd
fi
# Determine available interfaces
@@ -2018,21 +2024,19 @@ main() {
# Clone/Update the repos
clone_or_update_repos
- # Install packages used by the Pi-hole
- if [[ "${INSTALL_WEB}" == true ]]; then
+ # Install the Core dependencies
+ local dep_install_list=("${PIHOLE_DEPS[@]}")
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
# Install the Web dependencies
- DEPS=("${PIHOLE_DEPS[@]}" "${PIHOLE_WEB_DEPS[@]}")
- # Otherwise,
- else
- # just install the Core dependencies
- DEPS=("${PIHOLE_DEPS[@]}")
+ dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
fi
- install_dependent_packages DEPS[@]
+ install_dependent_packages dep_install_list[@]
+ unset dep_install_list
# On some systems, lighttpd is not enabled on first install. We need to enable it here if the user
# has chosen to install the web interface, else the `LIGHTTPD_ENABLED` check will fail
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
enable_service lighttpd
fi
@@ -2053,16 +2057,15 @@ main() {
# Clone/Update the repos
clone_or_update_repos
- # Install packages used by the Pi-hole
- if [[ "${INSTALL_WEB}" == true ]]; then
+ # Install the Core dependencies
+ local dep_install_list=("${PIHOLE_DEPS[@]}")
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
# Install the Web dependencies
- DEPS=("${PIHOLE_DEPS[@]}" "${PIHOLE_WEB_DEPS[@]}")
- # Otherwise,
- else
- # just install the Core dependencies
- DEPS=("${PIHOLE_DEPS[@]}")
+ dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
fi
- install_dependent_packages DEPS[@]
+
+ install_dependent_packages dep_install_list[@]
+ unset dep_install_list
if [[ -x "$(command -v systemctl)" ]]; then
# Value will either be 1, if true, or 0
@@ -2077,7 +2080,7 @@ main() {
# Copy the temp log file into final log location for storage
copy_to_install_log
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# Add password to web UI if there is none
pw=""
# If no password is set,
@@ -2096,7 +2099,7 @@ main() {
enable_service dnsmasq
# If the Web server was installed,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
if [[ "${LIGHTTPD_ENABLED}" == "1" ]]; then
start_service lighttpd
@@ -2123,7 +2126,7 @@ main() {
fi
# If the Web interface was installed,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
# If there is a password,
if (( ${#pw} > 0 )) ; then
# display the password
@@ -2135,7 +2138,7 @@ main() {
#
if [[ "${useUpdateVars}" == false ]]; then
# If the Web interface was installed,
- if [[ "${INSTALL_WEB}" == true ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
echo -e " View the web interface at http://pi.hole/admin or http://${IPV4_ADDRESS%/*}/admin"
echo ""
fi
diff --git a/automated install/uninstall.sh b/automated install/uninstall.sh
index 2f4f4f9f..2f4c58a1 100755
--- a/automated install/uninstall.sh
+++ b/automated install/uninstall.sh
@@ -46,13 +46,10 @@ source "${setupVars}"
distro_check
# Install packages used by the Pi-hole
-if [[ "${INSTALL_WEB}" == true ]]; then
+DEPS=("${INSTALLER_DEPS[@]}" "${PIHOLE_DEPS[@]}")
+if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
# Install the Web dependencies
- DEPS=("${INSTALLER_DEPS[@]}" "${PIHOLE_DEPS[@]}" "${PIHOLE_WEB_DEPS[@]}")
-# Otherwise,
-else
- # just install the Core dependencies
- DEPS=("${INSTALLER_DEPS[@]}" "${PIHOLE_DEPS[@]}")
+ DEPS+=("${PIHOLE_WEB_DEPS[@]}")
fi
# Compatability
From e401651f0974810e596ed486a4eecaaf3f8c6e27 Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Wed, 18 Apr 2018 04:11:32 +0100
Subject: [PATCH 07/21] Update https://github.com/pi-hole/pi-hole/pull/2115
+ Patch existing systems with the new variable changes using
'accountForRefactor'
+ Prompt user to install webserver
---
automated install/basic-install.sh | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index 79fe17bf..2ea37528 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -964,9 +964,25 @@ setAdminFlag() {
echo -e " ${INFO} Web Interface Off"
# or false
INSTALL_WEB_INTERFACE=false
- INSTALL_WEB_SERVER=false
;;
esac
+
+ # Request user to install web server, if --disable-install-webserver has not been used (INSTALL_WEB_SERVER=true is default).
+ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?" ${r} ${c} 6)
+ # with the default being enabled
+ WebChooseOptions=("On (Recommended)" "" on
+ Off "" off)
+ WebChoices=$("${WebToggleCommand[@]}" "${WebChooseOptions[@]}" 2>&1 >/dev/tty) || (echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}" && exit 1)
+ # Depending on their choice
+ case ${WebChoices} in
+ Off)
+ echo -e " ${INFO} Web Server Off"
+ # or false
+ INSTALL_WEB_SERVER=false
+ ;;
+ esac
+ fi
}
# Check if /etc/dnsmasq.conf is from pi-hole. If so replace with an original and install new in .d directory
@@ -1593,6 +1609,15 @@ accountForRefactor() {
sed -i 's/piholeIPv6/IPV6_ADDRESS/g' ${setupVars}
sed -i 's/piholeDNS1/PIHOLE_DNS_1/g' ${setupVars}
sed -i 's/piholeDNS2/PIHOLE_DNS_2/g' ${setupVars}
+ sed -i 's/^INSTALL_WEB=/INSTALL_WEB_INTERFACE=/' ${setupVars}
+ # Add 'INSTALL_WEB_SERVER', if its not been applied already: https://github.com/pi-hole/pi-hole/pull/2115
+ if ! grep -q '^INSTALL_WEB_SERVER=' ${setupVars}; then
+ local webserver_installed=false
+ if grep -q '^INSTALL_WEB_INTERFACE=true' ${setupVars}; then
+ webserver_installed=true
+ fi
+ echo -e "INSTALL_WEB_SERVER=$webserver_installed" >> ${setupVars}
+ fi
}
updatePihole() {
From 47c1071bb890407c6ba936673633fa48218b7416 Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Wed, 18 Apr 2018 04:24:48 +0100
Subject: [PATCH 08/21] Minor
+ Add info in regards to disabling web server install:
https://github.com/pi-hole/pi-hole/pull/2115
---
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 2ea37528..7b264320 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -969,7 +969,7 @@ setAdminFlag() {
# Request user to install web server, if --disable-install-webserver has not been used (INSTALL_WEB_SERVER=true is default).
if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
- WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?" ${r} ${c} 6)
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?\n\nNB: If you disable this, and, do not have an existing webserver installed, the web interface will not function." ${r} ${c} 6)
# with the default being enabled
WebChooseOptions=("On (Recommended)" "" on
Off "" off)
From c2c1dc74693fbf7d9e13208e63d0dc271a91deee Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Wed, 18 Apr 2018 04:38:07 +0100
Subject: [PATCH 09/21] Ensuring bot pleasure
https://github.com/pi-hole/pi-hole/pull/2115#pullrequestreview-113066748
---
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 7b264320..d3330995 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -969,7 +969,7 @@ setAdminFlag() {
# Request user to install web server, if --disable-install-webserver has not been used (INSTALL_WEB_SERVER=true is default).
if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
- WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?\n\nNB: If you disable this, and, do not have an existing webserver installed, the web interface will not function." ${r} ${c} 6)
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?\\n\\nNB: If you disable this, and, do not have an existing webserver installed, the web interface will not function." "${r}" "${c}" 6)
# with the default being enabled
WebChooseOptions=("On (Recommended)" "" on
Off "" off)
From 24b8b4e904b976b1fb91cc9ef66cdf693dcf0966 Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Wed, 18 Apr 2018 17:12:20 +0200
Subject: [PATCH 10/21] Add backend changes for supporting a local recursive
DNS server
Signed-off-by: DL6ER
---
advanced/Scripts/webpage.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh
index ce6c34d2..b04b55aa 100755
--- a/advanced/Scripts/webpage.sh
+++ b/advanced/Scripts/webpage.sh
@@ -149,6 +149,10 @@ ProcessDNSSettings() {
let COUNTER=COUNTER+1
done
+ if [ ! -z "${LOCAL_RECURSIVE}" ]; then
+ add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_RECURSIVE}"
+ fi
+
delete_dnsmasq_setting "domain-needed"
if [[ "${DNS_FQDN_REQUIRED}" == true ]]; then
@@ -525,6 +529,16 @@ SetPrivacyLevel() {
changeFTLsetting "PRIVACYLEVEL" "${args[2]}"
fi
}
+SetLocalRecursivePort() {
+ # Ensure port is a natural number { 0, 1, 2, 3, ... }
+ if [[ "${1}" == "0" ]]; then
+ delete_setting "LOCAL_RECURSIVE"
+ ProcessDNSSettings
+ elif [[ "${1}" =~ ^[0-9]+$ ]]; then
+ change_setting "LOCAL_RECURSIVE" "${1}"
+ ProcessDNSSettings
+ fi
+}
main() {
args=("$@")
@@ -556,6 +570,7 @@ main() {
"adlist" ) CustomizeAdLists;;
"audit" ) audit;;
"-l" | "privacylevel" ) SetPrivacyLevel;;
+ "localrecursivedns" ) SetLocalRecursivePort "$3";;
* ) helpFunc;;
esac
From ce35509a40a08ed61b7788e49b4677826ab0e75f Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Wed, 18 Apr 2018 17:30:51 +0200
Subject: [PATCH 11/21] Change command to "pihole -a localdnsport X"
Signed-off-by: DL6ER
---
advanced/Scripts/webpage.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh
index b04b55aa..21623eea 100755
--- a/advanced/Scripts/webpage.sh
+++ b/advanced/Scripts/webpage.sh
@@ -149,8 +149,8 @@ ProcessDNSSettings() {
let COUNTER=COUNTER+1
done
- if [ ! -z "${LOCAL_RECURSIVE}" ]; then
- add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_RECURSIVE}"
+ if [ ! -z "${LOCAL_DNS_PORT}" ]; then
+ add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_DNS_PORT}"
fi
delete_dnsmasq_setting "domain-needed"
@@ -529,13 +529,13 @@ SetPrivacyLevel() {
changeFTLsetting "PRIVACYLEVEL" "${args[2]}"
fi
}
-SetLocalRecursivePort() {
+SetLocalDNSport() {
# Ensure port is a natural number { 0, 1, 2, 3, ... }
if [[ "${1}" == "0" ]]; then
- delete_setting "LOCAL_RECURSIVE"
+ delete_setting "LOCAL_DNS_PORT"
ProcessDNSSettings
elif [[ "${1}" =~ ^[0-9]+$ ]]; then
- change_setting "LOCAL_RECURSIVE" "${1}"
+ change_setting "LOCAL_DNS_PORT" "${1}"
ProcessDNSSettings
fi
}
@@ -570,7 +570,7 @@ main() {
"adlist" ) CustomizeAdLists;;
"audit" ) audit;;
"-l" | "privacylevel" ) SetPrivacyLevel;;
- "localrecursivedns" ) SetLocalRecursivePort "$3";;
+ "localdnsport" ) SetLocalDNSport "$3";;
* ) helpFunc;;
esac
From 255cfb7d626633fa99a9f00b6e1662b8b23a2fca Mon Sep 17 00:00:00 2001
From: Rowan
Date: Thu, 19 Apr 2018 19:30:30 +0100
Subject: [PATCH 12/21] Fixed typo in README
Signed-off-by: Rowan Wookey
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5119fd8c..60c54f87 100644
--- a/README.md
+++ b/README.md
@@ -148,7 +148,7 @@ Some notable features include:
There are several ways to [access the dashboard](https://discourse.pi-hole.net/t/how-do-i-access-pi-holes-dashboard-admin-interface/3168):
1. `http:///admin/`
-2. `http:/pi.hole/admin/` (when using Pi-hole as your DNS server)
+2. `http://pi.hole/admin/` (when using Pi-hole as your DNS server)
3. `http://pi.hole/` (when using Pi-hole as your DNS server)
## Faster-than-light Engine
From 55fce489bc46ffe9c977ca78ab3b79641bcb569c Mon Sep 17 00:00:00 2001
From: Michele Bologna
Date: Thu, 19 Apr 2018 23:31:43 +0200
Subject: [PATCH 13/21] Fix: add psmisc as dependency
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Debian 9.4 does not install `psmisc` by default and the following error will happen during installation:
```
[✗] /usr/local/bin/pihole: line 353: killall: command not found
/usr/local/bin/pihole: line 364: killall: command not found
```
This patch adds `psmisc` (that contains `killall`) as dependency
Signed-off-by: Michele Bologna
---
automated install/basic-install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index 160039ce..c473d0c9 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -163,7 +163,7 @@ if command -v apt-get &> /dev/null; then
# These programs are stored in an array so they can be looped through later
INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
# Pi-hole itself has several dependencies that also need to be installed
- PIHOLE_DEPS=(bc cron curl dnsutils iputils-ping lsof netcat sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf)
+ PIHOLE_DEPS=(bc cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf)
# The Web dashboard has some that also need to be installed
# It's useful to separate the two since our repos are also setup as "Core" code and "Web" code
PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
@@ -1589,7 +1589,7 @@ updatePihole() {
# Install base files and web interface
installScripts
# Install config files
- installConfigs
+ installConfigs
# If the user wants to install the dasboard,
if [[ "${INSTALL_WEB}" == true ]]; then
# do so
From eccea8a911b3e1714b3feea9596c1c958e6bf0c0 Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Sat, 21 Apr 2018 08:27:31 +0100
Subject: [PATCH 14/21] Minor
+ Fix indentation
+ Stick with case, add "On" to provide INFO print out, although its not
technically required as INSTALL_WEB_SERVER=true is default value.
---
automated install/basic-install.sh | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index d3330995..4cc106fe 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -974,15 +974,20 @@ setAdminFlag() {
WebChooseOptions=("On (Recommended)" "" on
Off "" off)
WebChoices=$("${WebToggleCommand[@]}" "${WebChooseOptions[@]}" 2>&1 >/dev/tty) || (echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}" && exit 1)
- # Depending on their choice
- case ${WebChoices} in
- Off)
- echo -e " ${INFO} Web Server Off"
- # or false
- INSTALL_WEB_SERVER=false
- ;;
- esac
- fi
+ # Depending on their choice
+ case ${WebChoices} in
+ "On (Recommended)")
+ echo -e " ${INFO} Web Server On"
+ # set it to true, as clearly seen below.
+ INSTALL_WEB_SERVER=true
+ ;;
+ Off)
+ echo -e " ${INFO} Web Server Off"
+ # or false
+ INSTALL_WEB_SERVER=false
+ ;;
+ esac
+ fi
}
# Check if /etc/dnsmasq.conf is from pi-hole. If so replace with an original and install new in .d directory
From 60bcca54eb2b0f89fc897a83e4ff94ca39ca2927 Mon Sep 17 00:00:00 2001
From: "Daniel (Fourdee)"
Date: Sat, 21 Apr 2018 08:29:21 +0100
Subject: [PATCH 15/21] Minor
+ indentation
---
automated install/basic-install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index 4cc106fe..2429c6f3 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -979,12 +979,12 @@ setAdminFlag() {
"On (Recommended)")
echo -e " ${INFO} Web Server On"
# set it to true, as clearly seen below.
- INSTALL_WEB_SERVER=true
+ INSTALL_WEB_SERVER=true
;;
Off)
echo -e " ${INFO} Web Server Off"
# or false
- INSTALL_WEB_SERVER=false
+ INSTALL_WEB_SERVER=false
;;
esac
fi
From bac9e005aed0ac10ea9dfa63123ef1b5a9b7c72d Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Sat, 21 Apr 2018 23:27:36 +0200
Subject: [PATCH 16/21] Generate gravity.list and black.list in simple domain
lists format for FTLDNS. Leave local.list in HOSTS format
Signed-off-by: DL6ER
---
gravity.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gravity.sh b/gravity.sh
index 7fdb2723..f3b98eb2 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -512,13 +512,13 @@ gravity_ParseBlacklistDomains() {
# Empty $accretionDisc if it already exists, otherwise, create it
: > "${piholeDir}/${accretionDisc}"
-
+
if [[ -f "${piholeDir}/${whitelistMatter}" ]]; then
- gravity_ParseDomainsIntoHosts "${piholeDir}/${whitelistMatter}" "${piholeDir}/${accretionDisc}"
+ mv "${piholeDir}/${whitelistMatter}" "${piholeDir}/${accretionDisc}"
grep -c "^" "${piholeDir}/${whitelistMatter}" > "${piholeDir}/numBlocked" 2> /dev/null
else
# There was no whitelist file, so use preEventHorizon instead of whitelistMatter.
- gravity_ParseDomainsIntoHosts "${piholeDir}/${preEventHorizon}" "${piholeDir}/${accretionDisc}"
+ mv "${piholeDir}/${preEventHorizon}" "${piholeDir}/${accretionDisc}"
grep -c "^" "${piholeDir}/${preEventHorizon}" > "${piholeDir}/numBlocked" 2> /dev/null
fi
@@ -538,7 +538,7 @@ gravity_ParseUserDomains() {
return 0
fi
- gravity_ParseDomainsIntoHosts "${blacklistFile}" "${blackList}.tmp"
+ mv "${blacklistFile}" "${blackList}.tmp"
# Copy the file over as /etc/pihole/black.list so dnsmasq can use it
mv "${blackList}.tmp" "${blackList}" 2> /dev/null || \
echo -e "\\n ${CROSS} Unable to move ${blackList##*/}.tmp to ${piholeDir}"
From d24b141d8b5aab9f0e20d08331fc094db908b005 Mon Sep 17 00:00:00 2001
From: DL6ER
Date: Sat, 21 Apr 2018 23:58:42 +0200
Subject: [PATCH 17/21] Get rid of numBlocked file, FTLDNS can now determine
number of domains thanks to the new lists format
Signed-off-by: DL6ER
---
gravity.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/gravity.sh b/gravity.sh
index f3b98eb2..44889a60 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -515,11 +515,9 @@ gravity_ParseBlacklistDomains() {
if [[ -f "${piholeDir}/${whitelistMatter}" ]]; then
mv "${piholeDir}/${whitelistMatter}" "${piholeDir}/${accretionDisc}"
- grep -c "^" "${piholeDir}/${whitelistMatter}" > "${piholeDir}/numBlocked" 2> /dev/null
else
# There was no whitelist file, so use preEventHorizon instead of whitelistMatter.
mv "${piholeDir}/${preEventHorizon}" "${piholeDir}/${accretionDisc}"
- grep -c "^" "${piholeDir}/${preEventHorizon}" > "${piholeDir}/numBlocked" 2> /dev/null
fi
# Move the file over as /etc/pihole/gravity.list so dnsmasq can use it
From 9c29bd627e9b22ca6f16841989fbb0ccb5c89c77 Mon Sep 17 00:00:00 2001
From: Adam Warner
Date: Sat, 21 Apr 2018 23:55:33 +0100
Subject: [PATCH 18/21] fix user blacklisting
---
gravity.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gravity.sh b/gravity.sh
index 44889a60..4583208c 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -535,11 +535,10 @@ gravity_ParseUserDomains() {
if [[ ! -f "${blacklistFile}" ]]; then
return 0
fi
-
- mv "${blacklistFile}" "${blackList}.tmp"
+
# Copy the file over as /etc/pihole/black.list so dnsmasq can use it
- mv "${blackList}.tmp" "${blackList}" 2> /dev/null || \
- echo -e "\\n ${CROSS} Unable to move ${blackList##*/}.tmp to ${piholeDir}"
+ cp "${blacklistFile}" "${blackList}" 2> /dev/null || \
+ echo -e "\\n ${CROSS} Unable to move ${blacklistFile##*/} to ${piholeDir}"
}
# Trap Ctrl-C
From 8ead0b54830e59cd090ec317227916d441f05f7d Mon Sep 17 00:00:00 2001
From: Adam Warner
Date: Mon, 23 Apr 2018 11:59:39 +0100
Subject: [PATCH 19/21] @fourdee dropped this: `/`
Signed-off-by: Adam Warner
---
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 b9a23a72..50f112e6 100755
--- a/automated install/basic-install.sh
+++ b/automated install/basic-install.sh
@@ -1508,7 +1508,7 @@ finalExports() {
# If the setup variable file exists,
if [[ -e "${setupVars}" ]]; then
# update the variables in the file
- sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
+ sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;/INSTALL_WEB_SERVER/d;/INSTALL_WEB_INTERFACE/d;/LIGHTTPD_ENABLED/d;' "${setupVars}"
fi
# echo the information to the user
{
From ceaf4bc6bcfc1c6ad12dd57773dea2f9947a9a3e Mon Sep 17 00:00:00 2001
From: Adam Warner
Date: Mon, 23 Apr 2018 20:46:57 +0100
Subject: [PATCH 20/21] Some extra code made it's way into the dev branch. Not
entirely sure how that happened... related to #2115
Signed-off-by: Adam Warner
---
advanced/Scripts/update.sh | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh
index d2b31948..89e97fdf 100755
--- a/advanced/Scripts/update.sh
+++ b/advanced/Scripts/update.sh
@@ -113,24 +113,6 @@ main() {
echo -e " ${INFO} Pi-hole Core:\\t${COL_LIGHT_GREEN}up to date${COL_NC}"
fi
- if FTLcheckUpdate ; then
- FTL_update=true
- echo -e " ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}"
- else
- FTL_update=false
- echo -e " ${INFO} FTL:\\t\\t${COL_LIGHT_GREEN}up to date${COL_NC}"
- fi
-
- # Logic: Don't update FTL when there is a core update available
- # since the core update will run the installer which will itself
- # re-install (i.e. update) FTL
- if ${FTL_update} && ! ${core_update}; then
- echo ""
- echo -e " ${INFO} FTL out of date"
- FTLdetect
- echo ""
- fi
-
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
if ! is_repo "${ADMIN_INTERFACE_DIR}" ; then
echo -e "\\n ${COL_LIGHT_RED}Error: Web Admin repo is missing from system!
From 43f19034b9a4915c3bce680add731118fa501a56 Mon Sep 17 00:00:00 2001
From: MichaIng <28480705+MichaIng@users.noreply.github.com>
Date: Sat, 28 Apr 2018 15:17:29 +0200
Subject: [PATCH 21/21] "INSTALL_WEB" renamed to "INSTALL_WEB_INTERFACE" #2115
+ Small fix, as due to PR https://github.com/pi-hole/pi-hole/pull/2115 variable "INSTALL_WEB" was renamed into "INSTALL_WEB_INTERFACE".
---
advanced/Scripts/piholeCheckout.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh
index 589bb76e..71457f9b 100644
--- a/advanced/Scripts/piholeCheckout.sh
+++ b/advanced/Scripts/piholeCheckout.sh
@@ -157,7 +157,7 @@ checkout() {
echo ""
echo -e " ${INFO} Pi-hole Core"
fetch_checkout_pull_branch "${PI_HOLE_FILES_DIR}" "development" || { echo " ${CROSS} Unable to pull Core developement branch"; exit 1; }
- if [[ "${INSTALL_WEB}" == "true" ]]; then
+ if [[ "${INSTALL_WEB_INTERFACE}" == "true" ]]; then
echo ""
echo -e " ${INFO} Web interface"
fetch_checkout_pull_branch "${webInterfaceDir}" "devel" || { echo " ${CROSS} Unable to pull Web development branch"; exit 1; }
@@ -173,7 +173,7 @@ checkout() {
echo -e " ${INFO} Shortcut \"master\" detected - checking out master branches..."
echo -e " ${INFO} Pi-hole core"
fetch_checkout_pull_branch "${PI_HOLE_FILES_DIR}" "master" || { echo " ${CROSS} Unable to pull Core master branch"; exit 1; }
- if [[ ${INSTALL_WEB} == "true" ]]; then
+ if [[ ${INSTALL_WEB_INTERFACE} == "true" ]]; then
echo -e " ${INFO} Web interface"
fetch_checkout_pull_branch "${webInterfaceDir}" "master" || { echo " ${CROSS} Unable to pull Web master branch"; exit 1; }
fi
@@ -209,7 +209,7 @@ checkout() {
exit 1
fi
checkout_pull_branch "${PI_HOLE_FILES_DIR}" "${2}"
- elif [[ "${1}" == "web" ]] && [[ "${INSTALL_WEB}" == "true" ]] ; then
+ elif [[ "${1}" == "web" ]] && [[ "${INSTALL_WEB_INTERFACE}" == "true" ]] ; then
str="Fetching branches from ${webInterfaceGitUrl}"
echo -ne " ${INFO} $str"
if ! fully_fetch_repo "${webInterfaceDir}" ; then