From 9a0b01e61aa0e21383e7a67885db78bf77914d23 Mon Sep 17 00:00:00 2001 From: gbaconni Date: Sun, 7 Nov 2021 17:46:32 +0100 Subject: [PATCH] 2021-11-07 17:46:32 --- bonus.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bonus.sh b/bonus.sh index be696fe..626ec82 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 17:06:51 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 17:46:29 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -17,6 +17,7 @@ ft_mariadb () if ! dpkg --get-selections | grep -q '^mariadb-server' then apt-get install -qq -y mariadb-server + yes y | mysql_secure_installation fi return 0 } @@ -41,6 +42,18 @@ ft_php () ft_wordpress () { + if ! dpkg --get-selections | grep -q '^wordpress' + then + apt-get install -qq -y wordpress + fi + if ! test -L /var/www/html + then + ln -snf /usr/share/wordpress /var/www/html + chown -R www-data:www-data /usr/share/wordpress + fi + if ! test -d /var/lib/mysql/wordpress + bash -x /usr/share/wordpress/examples/setup-mysql -n wordpress localhost + fi return 0 }