Here is the simple shell script to start the mysql service if the service is stopped. #!/bin/bash SERVICE='mysql' if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo "$SERVICE service is running." else echo "$SERVICE is not running" service mysqld start fi Let me describe about…
More..