#!/bin/sh check=`ps aux |grep postgrey |grep -v grep |grep -v dogwatch` if [ -z "$check" ]; then service postgrey restart exit 1 else exit 0 fi