Skip to content

Instantly share code, notes, and snippets.

@subaddiction subaddiction/monitor.sh forked from mheadd/monitor.sh
Created Jun 11, 2014

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.