#!/bin/sh

#ConsoleMessage "Stopping SATARaid5Daemon"

#  If the daemon is already executing in the background, find it's process and terminate it.

r=`ps ax |grep SATARaid5Daemon | grep -v grep | grep -v $$ |grep -v $PPID | grep -v stop | grep -v start | awk '{print $1}'`
if [ "${r}" != "" ] ; then
    sudo /bin/kill -9 $r
fi
