#!/bin/sh
EMAIL='tech@ispserver.com'
TW='/usr/local/sbin/tw_cli'
STATUS=`${TW} info c0 u0`
echo ${STATUS} | egrep  'RAID-1[[:space:]]+OK' 2>&1 > /dev/null
if [ $? != 0 ] ; then
      ${TW} info c0 u0 | /usr/bin/mail -s "mirror degraded" ${EMAIL}
fi

