From b59cded3f3c2a44192031c9cf2ca149e3134c4f3 Mon Sep 17 00:00:00 2001 From: gbaconni Date: Sun, 7 Nov 2021 18:43:45 +0100 Subject: [PATCH] 2021-11-07 18:43:45 --- bonus.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bonus.sh b/bonus.sh index c3e5cfa..e732fb3 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 18:37:27 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 18:43:43 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -14,7 +14,7 @@ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ft_mariadb () { - if ! dpkg --get-selections | grep -q '^mariadb-server' + if ! dpkg --get-selections | grep -qP '^mariadb-server\t+install' then apt-get install -qq -y mariadb-server yes y | mysql_secure_installation @@ -24,7 +24,7 @@ ft_mariadb () ft_apache () { - if ! dpkg --get-selections | grep -q '^apache2' + if ! dpkg --get-selections | grep -qP '^apache2\t+install' then apt-get install -qq -y ssl-cert apache2 fi @@ -33,7 +33,7 @@ ft_apache () ft_php () { - if ! dpkg --get-selections | grep -q '^libapache2-mod-php' + if ! dpkg --get-selections | grep -qP '^libapache2-mod-php\t+install' then apt-get install -qq -y libapache2-mod-php fi @@ -43,7 +43,7 @@ ft_php () ft_wordpress () { password=${1-Born2beRoot} - if ! dpkg --get-selections | grep -q '^wordpress' + if ! dpkg --get-selections | grep -qP '^wordpress\tinstall' then apt-get install -qq -y wordpress fi