Bug fix empty value check CentOS (#85)

* added CentOS, Fedora, RHEL choices with minimal version check (recommited)

* fixed small typos

* added special option --use-php5-package

* parse options and export new environment variable USE_PHP5_PACKAGE

* added choice between php5* or php7.0* packages (recommited)

* fixed php*-fpm service name and php.ini file path (recommited)

* prepare socket name for nginx to work with php5-fpm or php7.0-fpm (recommited)

* added ppa:ondrej/php5-compat repo

* added dependency ppa:ondrej/php repo and package software-properties-common

* POSIX sh empty value check compatibility
This commit is contained in:
erxspin
2017-03-11 05:07:16 +06:00
committed by FusionPBX
parent f2265865f9
commit 26d050685a
4 changed files with 14 additions and 14 deletions

View File

@@ -7,23 +7,23 @@ cd "$(dirname "$0")"
. ./resources/colors.sh
. ./resources/arguments.sh
if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then
if [ .$CPU_CHECK = .true ] && [ .$USE_SWITCH_SOURCE = .false ]; then
#check what the CPU and OS are
OS_test=$(uname -m)
CPU_arch='unknown'
OS_bits='unknown'
CPU_bits='unknown'
if [ $OS_test = 'armv7l' ]; then
if [ .$OS_test = .'armv7l' ]; then
OS_bits='32'
CPU_bits='32'
# RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time
CPU_arch='arm'
elif [ $OS_test = 'armv8l' ]; then
elif [ .$OS_test = .'armv8l' ]; then
# We currently have no test case for armv8l
OS_bits='unknown'
CPU_bits='64'
CPU_arch='arm'
elif [ $OS_test = 'i386' ]; then
elif [ .$OS_test = .'i386' ]; then
OS_bits='32'
if [ "$(grep -o -w 'lm' /proc/cpuinfo)" = 'lm' ]; then
CPU_bits='64'
@@ -31,7 +31,7 @@ if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then
CPU_bits='32'
fi
CPU_arch='x86'
elif [ $OS_test = 'i686' ]; then
elif [ .$OS_test = .'i686' ]; then
OS_bits='32'
if [ "$(grep -o -w 'lm' /proc/cpuinfo)" = 'lm' ]; then
CPU_bits='64'
@@ -39,7 +39,7 @@ if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then
CPU_bits='32'
fi
CPU_arch='x86'
elif [ $OS_test = 'x86_64' ]; then
elif [ .$OS_test = .'x86_64' ]; then
OS_bits='64'
if [ "$(grep -o -w 'lm' /proc/cpuinfo)" = 'lm' ]; then
CPU_bits='64'
@@ -49,17 +49,17 @@ if [ $CPU_CHECK = true ] && [ $USE_SWITCH_SOURCE = false ]; then
CPU_arch='x86'
fi
if [ $CPU_arch = 'arm' ]; then
if [ .$CPU_arch = .'arm' ]; then
error "CentOS on arm is not supported at this time"
exit 3
elif [ $CPU_arch = 'x86' ]; then
if [ $OS_bits = '32' ]; then
elif [ .$CPU_arch = .'x86' ]; then
if [ .$OS_bits = .'32' ]; then
error "You are using a 32bit OS this is unsupported"
if [ $CPU_bits = '64' ]; then
if [ .$CPU_bits = .'64' ]; then
warning " Your CPU is 64bit you should consider reinstalling with a 64bit OS"
fi
exit 3
elif [ $OS_bits = '64' ]; then
elif [ .$OS_bits = .'64' ]; then
verbose "Correct CPU/OS detected"
else
error "Unknown OS_bits $OS_bits this is unsupported"