シェルでmysqlプロセスが存在するかどうか判断
mysql.sh
#!/bin/sh
while true
do
process=`ps aux | grep mysqld | grep -v grep`;
if [ “$process" == “" ]; then
sleep 1;
echo “no process";
else
echo “process exsits";
break;
fi
done