#! /bin/sh
#
# olympusd          Control the Olympus daemon.
#
# description: Mount Linux Olympus.  And advanced networked 
#	       graphical system administration environment
#	       which allows the user to control hundreds of
#	       systems (of different arch/OS) simultaneously.
#
# processname: olympusd
#
# pidfile: /var/run/olympusd.pid
# config: /etc/olympusd.conf
# config: /etc/olympus.data

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

[ -f /usr/bin/olympusd ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting the Olympus server: "
	daemon olympusd
	RETVAL=$?

	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/olympusd
	;;
  stop)
	echo -n "Stopping the Olympus server: "
	killproc olympusd
	RETVAL=$?

	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/olympusd
	;;
  status)
	status olympusd
	RETVAL=$?
	;;
  restart)
  	$0 stop
	$0 start
	RETVAL=$?
	;;
  reload)
	killall -HUP olympusd
	RETVAL=$?
	;;
  *)
	echo "Usage: inet {start|stop|status|restart|reload}"
	exit 1
esac

exit $REVAL
