Make sure mysql is an alias to mariadb

This commit is contained in:
Alexandre Aubin 2020-06-02 17:00:52 +02:00
parent 852cd14c4b
commit e24191ce64

View file

@ -15,6 +15,16 @@ do_pre_regen() {
do_post_regen() {
regen_conf_files=$1
# mysql is supposed to be an alias to mariadb... but in some weird case is not
# c.f. https://forum.yunohost.org/t/mysql-ne-fonctionne-pas/11661
# Playing with enable/disable allows to recreate the proper symlinks.
if [ ! -e /etc/systemd/system/mysql.service ]
then
systemctl disable mysql -q
systemctl disable mariadb -q
systemctl enable mariadb -q
fi
if [ ! -f /etc/yunohost/mysql ]; then
# ensure that mysql is running