#!/bin/bash

case "$1" in
  'start')
	echo -n "Starting megaraid monitor: MegaCt32"
	/usr/sbin/MegaCt32 -start -log /var/log/megaraid >/dev/null 2>&1
	/usr/sbin/MegaCt32 -cons -h1 -w1 -d5 -LogProg3600 >/dev/null 2>&1
	echo "."
	;;

  'stop')
	echo -n "Stoping megaraid monitor: MegaCt32"
	/usr/sbin/MegaCt32 -stop
	echo "."
	;;

  'restart')
	$0 stop
	$0 start 
	;;

  *)
	echo "usage: $0 start|stop|restart"
	exit 1
	;;
esac
	

  
