#!/bin/bash
# MYSQL + APACHE ¼ºñ½º üũ ½ºÅ©¸³Æ®
# MYSQL
PSID=$(ps ax|grep mysqld|grep -v grep|awk '{print $1}')
if [ "$PSID" == "" ]; then
echo "mysqld died"
/usr/local/mysql/bin/mysqld_safe -O max_connections=1000 -O table_cache=512 -O wait_timeout=300 &
else
echo "mysqld running"
fi
# APACHE
PSID=$(ps ax|grep httpd|grep -v grep|awk '{print $1}')
if [ "$PSID" == "" ]; then
echo "httpd died"
/usr/local/apache/bin/apachectl start
else
echo "apache running"
fi