diff --git a/ubuntu/resources/php.sh b/ubuntu/resources/php.sh index 8a30023..a76d05c 100755 --- a/ubuntu/resources/php.sh +++ b/ubuntu/resources/php.sh @@ -13,6 +13,11 @@ verbose "Configuring PHP" #add the repository if [ ."$os_name" = ."Ubuntu" ]; then + #18.04.x - /*bionic/ + if [ ."$os_codename" = ."focal" ]; then + echo "Ubuntu 20.04 LTS\n" + php_version=7.4 + fi #18.04.x - /*bionic/ if [ ."$os_codename" = ."bionic" ]; then echo "Ubuntu 18.04 LTS\n" @@ -44,8 +49,8 @@ fi if [ ."$php_version" = ."7.2" ]; then apt-get install -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd fi -if [ ."$php_version" = ."7.3" ]; then - apt-get install -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd +if [ ."$php_version" = ."7.4" ]; then + apt-get install -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd fi #update config if source is being used @@ -65,6 +70,10 @@ if [ ."$php_version" = ."7.2" ]; then verbose "version 7.2" php_ini_file='/etc/php/7.2/fpm/php.ini' fi +if [ ."$php_version" = ."7.4" ]; then + verbose "version 7.4" + php_ini_file='/etc/php/7.4/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 sed 's#; max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file @@ -88,7 +97,9 @@ fi if [ ."$php_version" = ."7.2" ]; then systemctl restart php7.2-fpm fi - +if [ ."$php_version" = ."7.4" ]; then + systemctl restart php7.4-fpm +fi #init.d #/usr/sbin/service php5-fpm restart #/usr/sbin/service php7.0-fpm restart