8 echo $
(pgrep
-u mysql mysqld
2>/dev
/null
);
13 stat_busy
"Starting MySQL Server"
14 [ ! -d /var
/run
/mysqld
] && install -d -g mysql
-o mysql
/var
/run
/mysqld
&>/dev
/null
15 if [ -z "$(getPID)" ]; then
16 /usr
/bin
/mysqld_safe
--user=mysql
&>/dev
/null
&
22 while [ $timeo -gt 0 ]; do
23 response
=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break
24 echo "$response" |
grep -q "mysqld is alive" && break
28 if [ $timeo -eq 0 ]; then
32 echo $
(getPID
) > /var
/run
/mysqld
/mysqld.pid
44 stat_busy
"Stopping MySQL Server"
45 if [ ! -z "$(getPID)" ]; then
47 kill $
(getPID
) &> /dev
/null
52 while [ ! -z "$(getPID)" -a $timeo -gt 0 ]; do
56 if [ -z "$(getPID)" ]; then
57 rm -f /var
/run
/mysqld
/mysqld.pid
&>/dev
/null
75 echo "usage: $0 {start|stop|restart}"