From 1131c766cef7c5ee9797908504aa0cce5ec101e2 Mon Sep 17 00:00:00 2001 From: gbaconni Date: Sun, 7 Nov 2021 20:00:18 +0100 Subject: [PATCH] 2021-11-07 20:00:18 --- bonus.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bonus.sh b/bonus.sh index 4e0f31e..cd0b910 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/07 19:13:38 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 20:00:02 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -27,6 +27,9 @@ ft_apache () if ! dpkg --get-selections | grep -qP '^apache2\t+install' then apt-get install -qq -y ssl-cert apache2 + a2enmod ssl + a2ensite default-ssl + systemctl reload apache2 fi return 0 } @@ -45,7 +48,7 @@ ft_wordpress () password=${1-Born2beRoot} if ! dpkg --get-selections | grep -qP '^wordpress\tinstall' then - apt-get install -qq -y wordpress + apt-get install -qq -y wordpress links fi if ! test -L /var/www/html then @@ -58,6 +61,7 @@ ft_wordpress () sed -i -r "s/(read.*)(yn|DB_PASSWORD)/\2=y/g; s/ -u \$DB_USER -p / -u root /g;" /usr/share/doc/wordpress/examples/setup-mysql bash -x /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost mysql -e "ALTER USER root@localhost IDENTIFIED BY '${password}'; FLUSH PRIVILEGES;" mysql + ln -snf /etc/wordpress/config-localhost.php /etc/wordpress/config-default.php fi return 0 }