Last active
December 17, 2021 03:24
-
-
Save rubnet/337eaa438a5effeab83fdd75330027d1 to your computer and use it in GitHub Desktop.
keep mysqld alive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pgrep mysqld | |
if [ $? -ne 0 ] | |
then | |
/etc/init.d/mysqld restart > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*/6 * * * * bash /root/monitorSQL.sh >/dev/null
crontab -e