This paste expires on 2023-04-15 08:56:24.641222. Repaste, or download this paste. . Pasted through v1-api.

#!/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
Filename: /usr/local/bin/watchGalera. Size: 437b. View raw, , hex, or download this file.