From ee507f636797d0af8a4faabf21d22eb7c1e6b16b Mon Sep 17 00:00:00 2001 From: gbaconni Date: Tue, 9 Nov 2021 09:58:21 +0100 Subject: [PATCH] 2021-11-09 09:58:21 --- bonus.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bonus.sh b/bonus.sh index 0275b25..31b1344 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 09:18:25 by gbaconni ### ########.fr # +# Updated: 2021/11/09 09:58:20 by gbaconni ### ########.fr # # # # **************************************************************************** # @@ -45,9 +45,11 @@ ft_lighttpd () if ! dpkg --get-selections | grep -qP '^lighttpd\t+install' then apt-get install -qq -y lighttpd - sed -i -r 's|^(server.document-root[^=]*=).*\1 "/usr/share/wordpress"|g' /etc/lighttpd/lighttpd.conf sed -i -r 's/80/4243/g' /etc/lighttpd/lighttpd.conf sed -i -r 's/443/4244/g' /etc/lighttpd/conf-available/10-ssl.conf + sed -i -r 's|"bin-path"([^=]*=>).*|"host"\1 "127.0.0.1",|g' /etc/lighttpd/conf-available/15-fastcgi-php.conf + sed -i -r 's|"socket"([^=]*=>).*|"port"\1 "9000",|g' /etc/lighttpd/conf-available/15-fastcgi-php.conf + sed -i -r 's|^(server.document-root[^=]*=).*|\1 "/usr/share/wordpress"|g' /etc/lighttpd/lighttpd.conf cat \ /etc/ssl/certs/ssl-cert-snakeoil.pem \ /etc/ssl/private/ssl-cert-snakeoil.key \ @@ -66,7 +68,7 @@ ft_php () then apt-get install -qq -y php php-fpm php-mysql sed -i -r 's/^;?(cgi.fix_pathinfo)=.*/\1=1/' /etc/php/7.4/fpm/php.ini - sed -i -r 's|(listen =).*|\1 /run/php/php-fpm.sock|' /etc/php/7.4/fpm/pool.d/www.conf + sed -i -r 's|(listen =).*|\1 127.0.0.1:9000|' /etc/php/7.4/fpm/pool.d/www.conf systemctl restart php7.4-fpm fi return 0