Skip to content

Instantly share code, notes, and snippets.

@fastmover
Created December 15, 2014 16:54
Show Gist options
  • Select an option

  • Save fastmover/213282cff2f7324879c8 to your computer and use it in GitHub Desktop.

Select an option

Save fastmover/213282cff2f7324879c8 to your computer and use it in GitHub Desktop.
#!/bin/sh
if ps ax | grep -v grep | grep -v $0 | grep mysqld > /dev/null
then
echo "mysqld service running, everything is fine"
else
echo "mysqld is not running"
service mysql start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment