diff --git a/debian/resources/php.sh b/debian/resources/php.sh index d659e36..1bd77fd 100755 --- a/debian/resources/php.sh +++ b/debian/resources/php.sh @@ -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