#!/bin/sh
#
# srmagent:	start/stop the TeraCloud SRM Product Agent
#
# chkconfig:	345 25 90
# description:	Storage Resourece Management agent
#
#  Licensed Materials - Property of TeraCloud Corporation
#  (C) Copyright 2007 TeraCloud Corporation, Bellevue, WA USA
#  All Rights Reserved
#

# Source function library.
. /etc/rc.d/init.d/functions

start()
{
	echo -n $"Starting SRMAgent service:"
	LD_LIBRARY_PATH=/opt/SRMProductAgent/bin
	export LD_LIBRARY_PATH
	daemon /opt/SRMProductAgent/bin/SRMAgent &
	echo ""
}

stop()
{
	echo -n "Stopping SRMAgent service:"
	killproc SRMAgent
	echo ""
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
        stop
        start
        ;;
  status)
        status SRMAgent
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload}"
        exit 1
	;;
esac

exit 0
