#! /bin/sh
#
# naming       Start/Stop the Fnorb CORBA Interface Repository.
#
# chkconfig: 2345 72 72
# description: ifrepo is a background daemon that maintains a database \
#              of CORBA interfaces, for dynamic invocations and such.
# processname: ifrepo
# config: /etc/crontab
# pidfile: /var/run/ifrepo.pid

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

# See how we were called.
case "$1" in
  start)
	echo -n "Starting Fnorb ORB Interface Repository: "
	fnifr --OAhost=vault --ior >/var/run/ifrepo.ior &
	echo
	;;
  stop)
	echo -n "Stopping Fnorb ORB Interface Repository: "
	killproc fnifr
	echo
	rm -f /var/run/ifrepo.ior
	;;
  status)
	status fnifr
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: naming {start|stop|status|restart}"
	exit 1
esac

exit 0
