diff --git a/bonus.sh b/bonus.sh index a5e2118..97cd770 100755 --- a/bonus.sh +++ b/bonus.sh @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/07 14:23:18 by gbaconni #+# #+# # -# Updated: 2021/11/09 06:51:27 by gbaconni ### lausanne.ch # +# Updated: 2021/11/09 07:42:04 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -45,9 +45,11 @@ ft_lighttpd () if ! dpkg --get-selections | grep -qP '^lighttpd\t+install' then apt-get install -qq -y lighttpd + lighttpd-enable-mod fastcgi + lighty-enable-mod fastcgi-php #sed -i 's/80/4243/g; s/443/4244/g;' /etc/apache2/ports.conf /etc/apache2/sites-available/{000-default,default-ssl}.conf #sed -i 's|/var/www/html|/usr/share/wordpress|g' /etc/apache2/sites-available/{000-default,default-ssl}.conf - systemctl reload lighttpd + systemctl force-reload lighttpd fi return 0 } @@ -69,11 +71,12 @@ ft_apache_alternative () ft_php () { - if ! dpkg --get-selections | grep -qP '^php\t+install' + if ! dpkg --get-selections | grep -qP '^php-fpm\t+install' then - apt-get install -qq -y php php-cgi php-fpm php-mysql + apt-get install -qq -y php php-fpm php-mysql #sed -i -r 's/^(cgi.fix_pathinfo[^=]*)=.*/\1=1/' /etc/php/7.3/fpm/php.ini #sed -i -r 's|^(listen[^=]*)=.*|\1 = /var/run/lighttpd/php.socket|' /etc/php/7.3/fpm/pool.d/www.conf + systemctl restart php7.3-fpm fi return 0 }