craigmcc    00/12/14 12:44:21

  Modified:    catalina/src/bin catalina.sh
  Log:
  Modify the startup/shutdown script so that it works from within the "bin"
  directory, as it already does in the Windows version.  Among other things,
  that means you can double click on the "startup.sh" or "shutdown.sh"
  scripts in a GUI environment to start or stop Tomcat.
  
  Revision  Changes    Path
  1.11      +21 -2     jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- catalina.sh       2000/11/04 16:09:33     1.10
  +++ catalina.sh       2000/12/14 20:44:15     1.11
  @@ -12,14 +12,33 @@
   #
   #   JAVA_HOME     Must point at your Java Development Kit installation.
   #
  -# $Id: catalina.sh,v 1.10 2000/11/04 16:09:33 craigmcc Exp $
  +# $Id: catalina.sh,v 1.11 2000/12/14 20:44:15 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
   # ----- Verify and Set Required Environment Variables -------------------------
   
   if [ "$CATALINA_HOME" = "" ] ; then
  -  CATALINA_HOME=`pwd`
  +  ## resolve links - $0 may be a link to  home
  +  PRG=$0
  +  progname=`basename $0`
  +  
  +  while [ -h "$PRG" ] ; do
  +    ls=`ls -ld "$PRG"`
  +    link=`expr "$ls" : '.*-> \(.*\)$'`
  +    if expr "$link" : '.*/.*' > /dev/null; then
  +     PRG="$link"
  +    else
  +     PRG="`dirname $PRG`/$link"
  +    fi
  +  done
  +  
  +  CATALINA_HOME_1=`dirname "$PRG"`/..
  +  echo "Guessing CATALINA_HOME from catalina.sh to ${CATALINA_HOME_1}" 
  +    if [ -d ${CATALINA_HOME_1}/conf ] ; then 
  +     CATALINA_HOME=${CATALINA_HOME_1}
  +     echo "Setting CATALINA_HOME to $CATALINA_HOME"
  +    fi
   fi
   
   if [ "$CATALINA_OPTS" = "" ] ; then
  
  
  

Reply via email to