Merge pull request #118 from sbadia/unstable-grepv

hooks: Use a more elegant grep command for mysql process check
This commit is contained in:
Jérôme Lebleu 2015-12-31 18:54:26 +01:00
commit a1ab3d5811

View file

@ -26,7 +26,7 @@ if [[ "$(safe_copy my.cnf /etc/mysql/my.cnf | tail -n1)" == "True" ]]; then
fi fi
if [ ! -f /etc/yunohost/mysql ]; then if [ ! -f /etc/yunohost/mysql ]; then
[[ $(/bin/ps aux | grep mysqld | grep -vc "grep") == "0" ]] \ [[ $(/bin/ps aux | grep '[m]ysqld') == "0" ]] \
&& sudo service mysql start && sudo service mysql start
mysql_password=$(randpass 10 0) mysql_password=$(randpass 10 0)