diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-01-27 00:13:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-01-27 00:13:46 +0000 |
commit | b7f435012837f8c2017119b9823e8566b671313c (patch) | |
tree | 3d370d642df742a8c8c6eab053da470afe96203c /usr/local/bin | |
parent | c0b131a5f446168104ab15be5e09e6b60f3afd5a (diff) | |
download | pfsense-b7f435012837f8c2017119b9823e8566b671313c.zip pfsense-b7f435012837f8c2017119b9823e8566b671313c.tar.gz |
Add check_reload_status checker script to ensure that it is always running.
Prior attempts to restart from filter.inc lead to socket descriptor inheriting strangeness.
Diffstat (limited to 'usr/local/bin')
-rwxr-xr-x | usr/local/bin/checkreload.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/bin/checkreload.sh b/usr/local/bin/checkreload.sh new file mode 100755 index 0000000..40bde37 --- /dev/null +++ b/usr/local/bin/checkreload.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +CHECKRELOADSTATUS=`pgrep check_reload_status | grep -v grep | wc -l` +DATE=`date +%m-%d-%Y_at_%H%M%S` +OUTFILE=/root/check_reload_status.log + +if [ ${CHECKRELOADSTATUS} -lt 1 ] ; then + echo "${DATE}: Re-starting check_reload_status, it died for some reason..." >> ${OUTFILE} + /usr/local/sbin/check_reload_status +fi + +if [ ${CHECKRELOADSTATUS} -gt 1 ] ; then + echo "${DATE} There appears to be 2 or more check_reload_status processes. Forcing kill and restart of all now..." >> ${OUTFILE} + kill -9 `pgrep check_reload_status` + /usr/local/sbin/check_reload_status +fi |