Created
June 14, 2016 04:04
-
-
Save smartideasinc/3317f24b28cb503fdc6c6363ddb2ff68 to your computer and use it in GitHub Desktop.
terminal
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 | |
service=mysql | |
if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 )) | |
then | |
echo "$service is running!!!" | |
else | |
#/etc/init.d/$service start | |
echo "Need to start at : $(date)" >> ~/mysql_stat.log | |
service mysql start | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment