#!/bin/sh

while [[ true ]]; do
	pgrep -x httpd > /dev/null 2>&1
	#killall -0 httpd 
	rc=$?

	if [[ $rc -ne 0 ]]; then
		logger -t "Process check" "httpd is down"
		service httpd start
	fi
	sleep 30

done
