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. 1) Check the mount point directoy name, in the following example the mount directory name […]
See MoreTag: Script
Script to automatically start Nginx
You can use the following script to auto restart the nginx on the server. The following script check the status and if it is down then it restart. You can set cron “* * * * * /bin/sh /root/autongnixrestart.sh” #! /bin/sh set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC=”nginx daemon” NAME=nginx DAEMON= /usr/sbin/$NAME SCRIPTNAME=/etc/init.d/$NAME test -x $DAEMON || exit […]
See MoreScript to automatically start mysql
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 is alive or not if mysqladmin ping | grep -q “alive”; then echo “MySQL is up” […]
See More
You must be logged in to post a comment.