mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Merge pull request #1792 from pi-hole/bugfix/lighttpdEnabled
Add in an extra check to enable lighttpd.
This commit is contained in:
commit
9642cda949
@ -208,7 +208,7 @@ elif command -v rpm &> /dev/null; then
|
|||||||
PKG_INSTALL=(${PKG_MANAGER} install -y)
|
PKG_INSTALL=(${PKG_MANAGER} install -y)
|
||||||
PKG_COUNT="${PKG_MANAGER} check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l"
|
PKG_COUNT="${PKG_MANAGER} check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l"
|
||||||
INSTALLER_DEPS=(dialog git iproute net-tools newt procps-ng)
|
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)
|
PIHOLE_WEB_DEPS=(lighttpd lighttpd-fastcgi php php-common php-cli php-pdo)
|
||||||
if ! grep -q 'Fedora' /etc/redhat-release; then
|
if ! grep -q 'Fedora' /etc/redhat-release; then
|
||||||
INSTALLER_DEPS=("${INSTALLER_DEPS[@]}" "epel-release");
|
INSTALLER_DEPS=("${INSTALLER_DEPS[@]}" "epel-release");
|
||||||
@ -1328,7 +1328,7 @@ installPiholeWeb() {
|
|||||||
else
|
else
|
||||||
# don't do anything
|
# don't do anything
|
||||||
echo -e "${OVER} ${CROSS} ${str}
|
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
|
fi
|
||||||
|
|
||||||
# Install Sudoers file
|
# Install Sudoers file
|
||||||
@ -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
|
#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..."
|
echo -e " ${INFO} Checking for existing FTL binary..."
|
||||||
|
|
||||||
local ftlLoc=$(which pihole-FTL)
|
local ftlLoc=$(which pihole-FTL 2>/dev/null)
|
||||||
|
|
||||||
if [[ ${ftlLoc} ]]; then
|
if [[ ${ftlLoc} ]]; then
|
||||||
local FTLversion=$(/usr/bin/pihole-FTL tag)
|
local FTLversion=$(/usr/bin/pihole-FTL tag)
|
||||||
@ -2004,8 +2004,15 @@ main() {
|
|||||||
# just install the Core dependencies
|
# just install the Core dependencies
|
||||||
DEPS=("${PIHOLE_DEPS[@]}")
|
DEPS=("${PIHOLE_DEPS[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_dependent_packages DEPS[@]
|
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
|
if [[ -x "$(command -v systemctl)" ]]; then
|
||||||
# Value will either be 1, if true, or 0
|
# Value will either be 1, if true, or 0
|
||||||
LIGHTTPD_ENABLED=$(systemctl is-enabled lighttpd | grep -c 'enabled' || true)
|
LIGHTTPD_ENABLED=$(systemctl is-enabled lighttpd | grep -c 'enabled' || true)
|
||||||
|
Loading…
Reference in New Issue
Block a user