Files
fusionpbx-install.sh/debian/resources/php.sh
erxspin 7cd7859a90 Fix to issue #76 - Use php5 for some dists with new command-line switch (#77)
* 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
2017-02-28 09:32:26 -07:00

33 lines
739 B
Bash
Executable File

#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
. ./colors.sh
. ./arguments.sh
#send a message
verbose "Configuring PHP"
#update config if source is being used
if [ .$USE_PHP5_PACKAGE = .true ]; then
verbose "version 5.x"
php_ini_file='/etc/php5/fpm/php.ini'
else
verbose "version 7.0"
php_ini_file='/etc/php/7.0/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 [ .$USE_PHP5_PACKAGE = .true ]; then
systemctl restart php5-fpm
else
systemctl restart php7.0-fpm
fi
#init.d
#/usr/sbin/service php7.0-fpm restart