mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
allow installer to continue with additional rpm based distros
- FedBerry (Fedora based ARM image) - Scientific Linux (CentOS based) - Add prompt to continue installing on unsupported RPM based distros Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
parent
a9c6d79cda
commit
24b4aabae9
1 changed files with 10 additions and 8 deletions
|
@ -244,17 +244,17 @@ elif command -v rpm &> /dev/null; then
|
|||
LIGHTTPD_GROUP="lighttpd"
|
||||
LIGHTTPD_CFG="lighttpd.conf.fedora"
|
||||
# If the host OS is Fedora,
|
||||
if grep -qi 'fedora' /etc/redhat-release; then
|
||||
if grep -qiE 'fedora|fedberry' /etc/redhat-release; then
|
||||
# all required packages should be available by default with the latest fedora release
|
||||
# ensure 'php-json' is installed on Fedora (installed as dependency on CentOS7 + Remi repository)
|
||||
PIHOLE_WEB_DEPS+=('php-json')
|
||||
# or if host OS is CentOS,
|
||||
elif grep -qi 'centos' /etc/redhat-release; then
|
||||
elif grep -qiE 'centos|scientific' /etc/redhat-release; then
|
||||
# Pi-Hole currently supports CentOS 7+ with PHP7+
|
||||
SUPPORTED_CENTOS_VERSION=7
|
||||
SUPPORTED_CENTOS_PHP_VERSION=7
|
||||
# Check current CentOS major release version
|
||||
CURRENT_CENTOS_VERSION=$(rpm -q --queryformat '%{VERSION}' centos-release)
|
||||
CURRENT_CENTOS_VERSION=$(grep -oP '(?<= )[0-9]+(?=\.)' /etc/redhat-release)
|
||||
# Check if CentOS version is supported
|
||||
if [[ $CURRENT_CENTOS_VERSION -lt $SUPPORTED_CENTOS_VERSION ]]; then
|
||||
echo -e " ${CROSS} CentOS $CURRENT_CENTOS_VERSION is not suported."
|
||||
|
@ -305,13 +305,15 @@ elif command -v rpm &> /dev/null; then
|
|||
fi
|
||||
fi
|
||||
else
|
||||
# If not a supported version of Fedora or CentOS,
|
||||
echo -e " ${CROSS} Unsupported RPM based distribution"
|
||||
# exit the installer
|
||||
exit
|
||||
# Warn user of unsupported version of Fedora or CentOS
|
||||
if ! whiptail --defaultno --title "Unsupported RPM based distribution" --yesno "Would you like to continue installation on an unsupported RPM based distribution?\\n\\nPlease ensure the following packages have been installed manually:\\n\\n- lighttpd\\n- lighttpd-fastcgi\\n- PHP version 7+" ${r} ${c}; then
|
||||
exit # exit the installer
|
||||
else
|
||||
: # continue with unsupported RPM distribution
|
||||
fi
|
||||
fi
|
||||
|
||||
# If neither apt-get or rmp/dnf are found
|
||||
# If neither apt-get or yum/dnf are found
|
||||
else
|
||||
# it's not an OS we can support,
|
||||
echo -e " ${CROSS} OS distribution not supported"
|
||||
|
|
Loading…
Reference in a new issue