Created
April 18, 2015 19:27
-
-
Save AurelioDeRosa/207a70c64007fc2dd05e to your computer and use it in GitHub Desktop.
Script to restart MySQL if it goes down
This file contains hidden or 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/sh | |
ps auxw | grep mysql | grep -v grep | |
if [ $? != 0 ] | |
then | |
sudo service mysql start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment