Update php.sh
This commit is contained in:
parent
1b318bed0c
commit
e348f0663f
|
|
@ -12,7 +12,7 @@ verbose "Configuring PHP"
|
||||||
|
|
||||||
#change the version of php for debian stretch
|
#change the version of php for debian stretch
|
||||||
if [ ."$os_codename" = ."stretch" ]; then
|
if [ ."$os_codename" = ."stretch" ]; then
|
||||||
php_version=7
|
php_version=7.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#update config if source is being used
|
#update config if source is being used
|
||||||
|
|
@ -20,21 +20,35 @@ if [ ."$php_version" = ."5" ]; then
|
||||||
verbose "version 5.x"
|
verbose "version 5.x"
|
||||||
php_ini_file='/etc/php5/fpm/php.ini'
|
php_ini_file='/etc/php5/fpm/php.ini'
|
||||||
fi
|
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"
|
verbose "version 7.1"
|
||||||
php_ini_file='/etc/php/7.1/fpm/php.ini'
|
php_ini_file='/etc/php/7.1/fpm/php.ini'
|
||||||
fi
|
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#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
|
sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
|
||||||
|
|
||||||
#restart php-fpm
|
#restart php-fpm
|
||||||
#systemd
|
#systemd
|
||||||
if [ ."$php_version" = ."5" ]; then
|
if [ ."$php_version" = ."5.6" ]; then
|
||||||
systemctl restart php5-fpm
|
systemctl restart php5-fpm
|
||||||
fi
|
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
|
systemctl restart php7.1-fpm
|
||||||
fi
|
fi
|
||||||
|
if [ ."$php_version" = ."7.2" ]; then
|
||||||
|
systemctl restart php7.2-fpm
|
||||||
|
fi
|
||||||
|
|
||||||
#init.d
|
#init.d
|
||||||
#/usr/sbin/service php5-fpm restart
|
#/usr/sbin/service php5-fpm restart
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue