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