From b64155a1657937b5302369732fda79565105c1c9 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 6 Dec 2017 14:32:39 +0000 Subject: [PATCH 1/4] Add in an extra check to enable lighttpd. Signed-off-by: Adam Warner --- automated install/basic-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 61d759ff..8380ca49 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2004,8 +2004,15 @@ main() { # just install the Core dependencies DEPS=("${PIHOLE_DEPS[@]}") fi + install_dependent_packages DEPS[@] + # 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 + enable_service lighttpd + fi + if [[ -x "$(command -v systemctl)" ]]; then # Value will either be 1, if true, or 0 LIGHTTPD_ENABLED=$(systemctl is-enabled lighttpd | grep -c 'enabled' || true) From f60791ac7c9afca9a3270a6edc67b58423f92671 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 6 Dec 2017 14:42:01 +0000 Subject: [PATCH 2/4] Add dependencies as per https://github.com/pi-hole/pi-hole/pull/1776#discussion_r155149349 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 8380ca49..a9bebba2 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -208,7 +208,7 @@ elif command -v rpm &> /dev/null; then PKG_INSTALL=(${PKG_MANAGER} install -y) PKG_COUNT="${PKG_MANAGER} check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l" INSTALLER_DEPS=(dialog git iproute net-tools newt procps-ng) - PIHOLE_DEPS=(bc bind-utils cronie curl dnsmasq findutils nmap-ncat sudo unzip wget idn2) + PIHOLE_DEPS=(bc bind-utils cronie curl dnsmasq findutils nmap-ncat sudo unzip wget libidn2 psmisc) PIHOLE_WEB_DEPS=(lighttpd lighttpd-fastcgi php php-common php-cli php-pdo) if ! grep -q 'Fedora' /etc/redhat-release; then INSTALLER_DEPS=("${INSTALLER_DEPS[@]}" "epel-release"); From 945dcc6c2b67838a4864067899b2b75985d5078e Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 6 Dec 2017 15:17:31 +0000 Subject: [PATCH 3/4] Indent two spaces as per https://github.com/pi-hole/pi-hole/pull/1776#discussion_r155157116 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 a9bebba2..d71cd891 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1328,7 +1328,7 @@ installPiholeWeb() { else # don't do anything echo -e "${OVER} ${CROSS} ${str} - No default index.lighttpd.html file found... not backing up" + No default index.lighttpd.html file found... not backing up" fi # Install Sudoers file From dd6a9a0b8473d112c7d372c12023011490900818 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 6 Dec 2017 15:28:58 +0000 Subject: [PATCH 4/4] supress output of `which command` on centos/fedora as per https://github.com/pi-hole/pi-hole/pull/1776#discussion_r155156819 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 d71cd891..3377ca86 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1856,7 +1856,7 @@ FTLdetect() { #If the installed version matches the latest version, then check the installed sha1sum of the binary vs the remote sha1sum. If they do not match, then download echo -e " ${INFO} Checking for existing FTL binary..." - local ftlLoc=$(which pihole-FTL) + local ftlLoc=$(which pihole-FTL 2>/dev/null) if [[ ${ftlLoc} ]]; then local FTLversion=$(/usr/bin/pihole-FTL tag)