The following script is used to start mysql automatically when it is failed or stopped on the server. You can set 2 min cron "*/2 * * * * /bin/sh /root/automysqlstart.sh" and it restart the mysql automatically. ============================ #!/bin/bash #Checking whether MySQL...
Category: Shell Programming and Scripting
Basic Linux, Shell Programming and Scripting
how to run bash scripts from local machine to remote linux machine
Q. How to run bash script from local machine to remote linux machine ? Ans : We can run the bash script from our local machine to remote machine without login to remote server. We will get the result of...
How to, Shell Programming and Scripting
script to check NFS mount point
How to check NFS mount point by using the script ? Ans : If you we have mounted the NFS directory one or more servers and you want to monitor that mount point then you can use the following method....
Basic Linux, Shell Programming and Scripting
Script to restart any service automatically
We can set the cron to restart the server when it was down or not running. You can use following script to detect and restart the httpd,ngnix,Serv-U or any other services. 1) Create the file vi /root/autorestart.sh and add the...