forked from norman/fusionpbx-install.sh-github-mirror
* 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
This commit is contained in:
17
debian/resources/php.sh
vendored
17
debian/resources/php.sh
vendored
@@ -10,12 +10,23 @@ cd "$(dirname "$0")"
|
||||
verbose "Configuring PHP"
|
||||
|
||||
#update config if source is being used
|
||||
sed 's#post_max_size = .*#post_max_size = 80M#g' -i /etc/php/7.0/fpm/php.ini
|
||||
sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i /etc/php/7.0/fpm/php.ini
|
||||
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
|
||||
/bin/systemctl restart php7.0-fpm
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user