| #!/bin/bash
|
| echo $$ > /run/watchGalera.pid # spit the proc identifier
|
|
|
| tail -f /var/log/mysql.log | while read LOGLINE
|
| do
|
| # thats what she said
|
| [[ "${LOGLINE}" == *"cleaning up"* ]] && echo -e " \e[1m\e[92m*** \e[97mFault Detected\e[1m\e[92m ***" && mkill && break;
|
| [[ "${LOGLINE}" == *"Aborting"* ]] && echo -e " \e[1m\e[92m*** \e[97mFault Detected\e[1m\e[92m ***" && service mysql restart -q && break;
|
| # thats what i said
|
| done
|