#!/bin/sh PROCS="httpd sdad" for p in $PROCS ; do X=`ps -e | grep $p` if [ -z "$X" ] ; then echo $p is down exit fi done echo OK