SKoL
09-12-2001, 09:35 PM
Sup guys, Need some help.
I've got MySQL and apache running. In case one of them dies, I wrote a script to restart it.
Problem is, (as we all know) MySQL has the safe_mysqld action to try to keep MySQL from totally dying. I need the script to kill the PID of safe_mysqld then restart it using another script i have, here is it so far.
#
#This is where I need all mysqld to be #killed then restart mysql using the ./ci-#mysqlserver start script
#
#
if !(ps -u root | grep safe_mysqld); then
/usr/local/courseinfo/tools/./ci-mysqlserver start
fi
#
#
#This bottom part is fine, it restarts #apache fine
#
#for httpd
if !(ps -u ciuser | grep httpd); then
/usr/local/courseinfo/tools/./ci-httpdserver restart
fi
thanks..
I've got MySQL and apache running. In case one of them dies, I wrote a script to restart it.
Problem is, (as we all know) MySQL has the safe_mysqld action to try to keep MySQL from totally dying. I need the script to kill the PID of safe_mysqld then restart it using another script i have, here is it so far.
#
#This is where I need all mysqld to be #killed then restart mysql using the ./ci-#mysqlserver start script
#
#
if !(ps -u root | grep safe_mysqld); then
/usr/local/courseinfo/tools/./ci-mysqlserver start
fi
#
#
#This bottom part is fine, it restarts #apache fine
#
#for httpd
if !(ps -u ciuser | grep httpd); then
/usr/local/courseinfo/tools/./ci-httpdserver restart
fi
thanks..