#! /bin/sh -f
#############################################################
#############################################################
#
# Stopping the CorbaWeb environment.
#
#############################################################
#############################################################

#############################################################
# Test the CorbaWeb environment.
#############################################################

if test "${CW_BINDIR}" = ""
then
  echo The CW_BINDIR shell variable must be set!
  echo "e.g.:"
  echo "      CW_BINDIR=/path_to_CorbaWeb_binaries"
  echo "      export CW_BINDIR"
  return
fi

#############################################################
# Source the CorbaWeb configuration.
#############################################################

. ${CW_BINDIR}/envi.CorbaWeb.sh

#############################################################
# Stop the CorbaWeb HTTP Server.
#############################################################

if test ! -f ${CW_PID_FILE}
then
  echo Warning, the CorbaWeb HTTP Server is not started!
else
  echo The CorbaWeb HTTP Server will be stopped.
    stop_process `cat ${CW_PID_FILE}`
    rm -f ${CW_PID_FILE}
  echo The CorbaWeb HTTP Server is stopped.  
fi

#############################################################
# End of the 'CorbaWeb/bin/corbaweb_stop' script.
#############################################################
