Project

General

Profile

Download (640 Bytes) Statistics
| Branch: | Tag: | Revision:
1 b7f43501 Scott Ullrich
#!/bin/sh
2
3 c7188ade Chris Buechler
CHECKRELOADSTATUS=`pgrep check_reload_status | wc -l`
4 b7f43501 Scott Ullrich
DATE=`date +%m-%d-%Y_at_%H%M%S`
5
OUTFILE=/root/check_reload_status.log
6
7
if [ ${CHECKRELOADSTATUS} -lt 1 ] ; then
8
        echo "${DATE}: Re-starting check_reload_status, it died for some reason..." >> ${OUTFILE}
9 857f842a Scott Ullrich
        nohup /usr/bin/nice -n20 /usr/local/sbin/check_reload_status &
10 b7f43501 Scott Ullrich
fi
11
12
if [ ${CHECKRELOADSTATUS} -gt 1 ] ; then
13
        echo "${DATE} There appears to be 2 or more check_reload_status processes. Forcing kill and restart of all now..." >> ${OUTFILE}
14
        kill -9 `pgrep check_reload_status`
15 857f842a Scott Ullrich
		nohup /usr/bin/nice -n20 /usr/local/sbin/check_reload_status &
16 b7f43501 Scott Ullrich
fi