#!/bin/sh # check raid status and email if not ok STATUS=`/sbin/dmraid -s | grep "status"` if [ "$STATUS" != "status : ok" ] then /sbin/dmraid -s | mail -s "Server: RAID ERROR: $STATUS" email@rkcsd.com fi