#!/bin/sh while: do proInfo = $(ps -ef|grep "ProcessName" |grep -v "grep") if ["$proInfo"] ; then echo "ProcessName is running" else echo "ProcessName was stoped" echo " to start ProcessName" #Add the calling process startup script here echo "ProcessName was started" be sleep 10 done