agdb1:/var/lib/mysqlbackup # vi /usr/bin/restartsql
#!/bin/sh
# filed named killbill
# set -x
TEST=0
TEST=`ps ax | grep mysqld | grep -v grep | wc -l`
if [ $TEST = 0 ] ; then
rcmysql start
fi
exit 0

Advertisements