[fix] Rely on systemd is-active to check if mysql is running

This commit is contained in:
Jérôme Lebleu 2016-05-22 16:46:32 +02:00
parent 53573e50dc
commit 0b5cc9d6b1

View file

@ -17,8 +17,8 @@ do_post_regen() {
. /usr/share/yunohost/helpers.d/string
# ensure that mysql is running
ps -C mysqld >/dev/null 2>&1 \
|| service mysql start
sudo systemctl -q is-active mysql.service \
|| sudo service mysql start
# generate and set new root password
mysql_password=$(ynh_string_random 10)