2021-11-07 17:46:32

This commit is contained in:
gbaconni
2021-11-07 17:46:32 +01:00
parent f6c5542937
commit 9a0b01e61a

View File

@@ -6,7 +6,7 @@
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2021/11/07 14:23:18 by gbaconni #+# #+# # # 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' if ! dpkg --get-selections | grep -q '^mariadb-server'
then then
apt-get install -qq -y mariadb-server apt-get install -qq -y mariadb-server
yes y | mysql_secure_installation
fi fi
return 0 return 0
} }
@@ -41,6 +42,18 @@ ft_php ()
ft_wordpress () 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 return 0
} }