#!/bin/sh
#portinstall arcconf
EMAIL='tech@ispserver.com'
ARCCONF='/usr/local/sbin/arcconf'
HOST=`/bin/hostname`
#Status of logical device                 : Optimal
${ARCCONF} GETCONFIG 1 LD | /usr/bin/grep 'Status of logical device' | /usr/bin/grep -q Degraded
if [ $? = 0 ] ; then
      ${ARCCONF} GETCONFIG 1 AL | /usr/bin/mail -s "${HOST} - mirror degraded" ${EMAIL} -f ${EMAIL}
fi

