#!/bin/sh
EMAIL='tech@ispserver.com'
GMIRR='/sbin/gmirror'
STATUS=`${GMIRR} status`
HOSTNAME=`/bin/hostname`
echo ${STATUS} | grep -q DEGRADED
if [ $? = 0 ] ; then
       ${GMIRR} list | /usr/bin/mail -s "${HOSTNAME} - mirror degraded" ${EMAIL} -f ${EMAIL}
fi

