2021-11-07 20:00:18
This commit is contained in:
8
bonus.sh
8
bonus.sh
@@ -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 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'
|
if ! dpkg --get-selections | grep -qP '^apache2\t+install'
|
||||||
then
|
then
|
||||||
apt-get install -qq -y ssl-cert apache2
|
apt-get install -qq -y ssl-cert apache2
|
||||||
|
a2enmod ssl
|
||||||
|
a2ensite default-ssl
|
||||||
|
systemctl reload apache2
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -45,7 +48,7 @@ ft_wordpress ()
|
|||||||
password=${1-Born2beRoot}
|
password=${1-Born2beRoot}
|
||||||
if ! dpkg --get-selections | grep -qP '^wordpress\tinstall'
|
if ! dpkg --get-selections | grep -qP '^wordpress\tinstall'
|
||||||
then
|
then
|
||||||
apt-get install -qq -y wordpress
|
apt-get install -qq -y wordpress links
|
||||||
fi
|
fi
|
||||||
if ! test -L /var/www/html
|
if ! test -L /var/www/html
|
||||||
then
|
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
|
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
|
bash -x /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
|
||||||
mysql -e "ALTER USER root@localhost IDENTIFIED BY '${password}'; FLUSH PRIVILEGES;" mysql
|
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
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user