Update php.sh

This commit is contained in:
FusionPBX 2018-10-09 20:35:39 -06:00 committed by GitHub
parent 1b318bed0c
commit e348f0663f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 4 deletions

View File

@ -12,7 +12,7 @@ verbose "Configuring PHP"
#change the version of php for debian stretch
if [ ."$os_codename" = ."stretch" ]; then
php_version=7
php_version=7.0
fi
#update config if source is being used
@ -20,21 +20,35 @@ if [ ."$php_version" = ."5" ]; then
verbose "version 5.x"
php_ini_file='/etc/php5/fpm/php.ini'
fi
if [ ."$php_version" = ."7" ]; then
if [ ."$php_version" = ."7.0" ]; then
verbose "version 7.0"
php_ini_file='/etc/php/7.0/fpm/php.ini'
fi
if [ ."$php_version" = ."7.1" ]; then
verbose "version 7.1"
php_ini_file='/etc/php/7.1/fpm/php.ini'
fi
if [ ."$php_version" = ."7.2" ]; then
verbose "version 7.2"
php_ini_file='/etc/php/7.2/fpm/php.ini'
fi
sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
#restart php-fpm
#systemd
if [ ."$php_version" = ."5" ]; then
if [ ."$php_version" = ."5.6" ]; then
systemctl restart php5-fpm
fi
if [ ."$php_version" = ."7" ]; then
if [ ."$php_version" = ."7.0" ]; then
systemctl restart php7.0-fpm
fi
if [ ."$php_version" = ."7.1" ]; then
systemctl restart php7.1-fpm
fi
if [ ."$php_version" = ."7.2" ]; then
systemctl restart php7.2-fpm
fi
#init.d
#/usr/sbin/service php5-fpm restart