Skip to content

Instantly share code, notes, and snippets.

@subaddiction
Forked from mheadd/monitor.sh
Created June 11, 2014 09:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save subaddiction/ed00a6f979c8828914f0 to your computer and use it in GitHub Desktop.
#!/bin/bash
UP=$(pgrep mysql | wc -l);
if [ "$UP" -ne 1 ];
then
echo "MySQL is down.";
sudo service mysql start
else
echo "All is well.";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment