wok rev 2398

mysql: improve start script
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 10 09:19:09 2009 +0000 (2009-03-10)
parents 3c8195fabdd1
children 217f2bbcfb1b
files mysql/stuff/etc/init.d/mysql
line diff
     1.1 --- a/mysql/stuff/etc/init.d/mysql	Tue Mar 10 09:17:01 2009 +0000
     1.2 +++ b/mysql/stuff/etc/init.d/mysql	Tue Mar 10 09:19:09 2009 +0000
     1.3 @@ -17,7 +17,7 @@
     1.4  
     1.5  case "$1" in
     1.6    start)
     1.7 -    if [ -f $PIDFILE ] ; then
     1.8 +    if active_pidfile $PIDFILE mysqld ; then
     1.9        echo "$NAME already running."
    1.10        exit 1
    1.11      fi
    1.12 @@ -43,7 +43,7 @@
    1.13      fi
    1.14      ;;
    1.15    stop)
    1.16 -    if [ ! -f $PIDFILE ] ; then
    1.17 +    if ! active_pidfile $PIDFILE mysqld ; then
    1.18        echo "$NAME is not running."
    1.19        exit 1
    1.20      fi
    1.21 @@ -53,7 +53,7 @@
    1.22      sleep 2
    1.23      ;;
    1.24    restart)
    1.25 -    if [ ! -f $PIDFILE ] ; then
    1.26 +    if ! active_pidfile $PIDFILE mysqld ; then
    1.27        echo "$NAME is not running."
    1.28        exit 1
    1.29      fi