dbmonitor.sh

1
2
3
4
5
6
7
8
9
#!/bin/bash
# MYSQL SECTION
RESTARTM="/etc/init.d/mysql restart"
MYSQLD="mysqld"
$PGREP ${MYSQLD}
if [ $? -ne 0 ]; then
$RESTART
$RESTARTM
fi