#!/bin/sh
#
# description: Starts the IIR server

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

# Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit 0


RETVAL=0
BASE_DIR="/opt/iir"

# See how we were called.
case "$1" in
  start)
	echo -n "Starting RAID Configuration services: "
	cd $BASE_DIR/; daemon bin/irstart 
	RETVAL=$?
	echo
	;;
  stop)
	echo -n "Shutting down RAID Configuration services: "
	#rsspid=`cat $BASE_DIR/iirserver/etc/rss.pid`
	#kill -9 $rsspid
	killproc iird
	RETVAL=$?
	echo
	;;
   restart)
	$0 stop
	$0 start
	RETVAL=$?
	echo
	;;

  *)
	echo "Usage: $0 {start | stop | restart}"
	exit 1
esac

exit $RETVAL
