home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / shutdown-using-launcher.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2004-08-28  |  770 b   |  30 lines

  1. #!/bin/sh
  2.  
  3. # -----------------------------------------------------------------------------
  4. #
  5. # Script for shutting down Catalina using the Launcher
  6. #
  7. # -----------------------------------------------------------------------------
  8.  
  9. # Resolve links - $0 may be a softlink
  10. PRG="$0"
  11.  
  12. while [ -h "$PRG" ]; do
  13.   ls=`ls -ld "$PRG"`
  14.   link=`expr "$ls" : '.*-> \(.*\)$'`
  15.   if expr "$link" : '.*/.*' > /dev/null; then
  16.     PRG="$link"
  17.   else
  18.     PRG=`dirname "$PRG"`/"$link"
  19.   fi
  20. done
  21.  
  22. # Get standard environment variables
  23. PRGDIR=`dirname "$PRG"`
  24. if [ -r "$PRGDIR"/setenv.sh ]; then
  25.   . "$PRGDIR"/setenv.sh
  26. fi
  27.  
  28. # Execute the Launcher using the "catalina" target
  29. exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose catalina "$@" stop
  30.