Update nginx.sh

This commit is contained in:
FusionPBX 2019-02-17 08:51:19 -07:00 committed by GitHub
parent 74a603d2df
commit 91661b4350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 40 deletions

View File

@ -11,29 +11,8 @@ cd "$(dirname "$0")"
#send a message
verbose "Installing the web server"
#change the version of php for debian stretch
if [ ."$os_codename" = ."stretch" ]; then
php_version=7.0
fi
#if [ ."$cpu_architecture" = ."arm" ]; then
#9.x - */stretch/
#8.x - */jessie/
#fi
if [ ."$php_version" = ."5.6" ]; then
#verbose "Switching forcefully to php5* packages"
which add-apt-repository || apt-get install -y software-properties-common
#LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
#LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-compat
elif [ ."$os_name" = ."Ubuntu" ]; then
#16.10.x - */yakkety/
#16.04.x - */xenial/
#14.04.x - */trusty/
if [ ."$os_codename" = ."trusty" ]; then
which add-apt-repository || apt-get install -y software-properties-common
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
fi
elif [ ."$cpu_architecture" = ."arm" ]; then
#change the version of php for arm
if [ ."$cpu_architecture" = ."arm" ]; then
#Pi2 and Pi3 Raspbian
#Odroid
if [ ."$os_codename" = ."stretch" ]; then
@ -41,24 +20,7 @@ elif [ ."$cpu_architecture" = ."arm" ]; then
else
php_version=5.6
fi
apt-get -y install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
else
#9.x - */stretch/
#8.x - */jessie/
if [ ."$os_codename" = ."jessie" ]; then
apt-get -y install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
apt-get update
#use php version 5.6 for arm
#if [ .$cpu_architecture = .'arm' ]; then
# php_version=5.6
#fi
#enable fusionpbx nginx config
cp nginx/fusionpbx /etc/nginx/sites-available/fusionpbx