#!/bin/bash
#
# Stop Monitoring software raid arrays
exec 2>&1
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /sbin/mdadm`
    stat_runit "Stopping mdadm RAID Monitor"
    [ ! -z "$PID" ] && kill $PID &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon mdadm
      stat_done
    fi