diff --git a/debian/install.sh b/debian/install.sh index 821418c..4876fd7 100755 --- a/debian/install.sh +++ b/debian/install.sh @@ -157,7 +157,11 @@ server_address=$(hostname -I) #restart services systemctl daemon-reload -systemctl restart php7.0-fpm +if [ .$USE_PHP5_PACKAGE = .true ]; then + systemctl restart php5-fpm +else + systemctl restart php7.0-fpm +fi systemctl restart nginx systemctl restart fail2ban diff --git a/debian/resources/php.sh b/debian/resources/php.sh index f70111d..d9232c5 100755 --- a/debian/resources/php.sh +++ b/debian/resources/php.sh @@ -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