|
|
@ -397,14 +397,16 @@ select_rpm_php(){
|
|
|
|
unset CENTOS7_PIHOLE_WEB_DEPS
|
|
|
|
unset CENTOS7_PIHOLE_WEB_DEPS
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# CentOS requires the EPEL repository to gain access to Fedora packages
|
|
|
|
# CentOS requires the EPEL repository to gain access to Fedora packages
|
|
|
|
EPEL_PKG="epel-release"
|
|
|
|
if [[ CURRENT_CENTOS_VERSION -eq 7 ]]; then
|
|
|
|
rpm -q ${EPEL_PKG} &> /dev/null || rc=$?
|
|
|
|
EPEL_PKG="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
|
|
|
|
if [[ $rc -ne 0 ]]; then
|
|
|
|
elif [[ CURRENT_CENTOS_VERSION -eq 8 ]]; then
|
|
|
|
printf " %b Enabling EPEL package repository (https://fedoraproject.org/wiki/EPEL)\\n" "${INFO}"
|
|
|
|
EPEL_PKG="https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
|
|
|
|
"${PKG_INSTALL[@]}" ${EPEL_PKG} &> /dev/null
|
|
|
|
|
|
|
|
printf " %b Installed %s\\n" "${TICK}" "${EPEL_PKG}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf " %b Enabling EPEL package repository (https://fedoraproject.org/wiki/EPEL)\\n" "${INFO}"
|
|
|
|
|
|
|
|
"${PKG_INSTALL[@]}" ${EPEL_PKG} &> /dev/null
|
|
|
|
|
|
|
|
printf " %b Installed %s\\n" "${TICK}" "${EPEL_PKG}"
|
|
|
|
|
|
|
|
|
|
|
|
# The default php on CentOS 7.x is 5.4 which is EOL
|
|
|
|
# The default php on CentOS 7.x is 5.4 which is EOL
|
|
|
|
# Check if the version of PHP available via installed repositories is >= to PHP 7
|
|
|
|
# Check if the version of PHP available via installed repositories is >= to PHP 7
|
|
|
|
AVAILABLE_PHP_VERSION=$("${PKG_MANAGER}" info php | grep -i version | grep -o '[0-9]\+' | head -1)
|
|
|
|
AVAILABLE_PHP_VERSION=$("${PKG_MANAGER}" info php | grep -i version | grep -o '[0-9]\+' | head -1)
|
|
|
|