#! /bin/sh
#
# naming       Start/Stop the Fnorb CORBA Name Service.
#
# chkconfig: 2345 72 72
# description: naming is a background daemon that keeps track of registered \
#              CORBA object references.
# processname: fnaming
# config: /etc/crontab
# pidfile: /var/run/fnaming.pid

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

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

exit 0
