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.bat < prev    next >
Encoding:
DOS Batch File  |  2004-08-28  |  1.2 KB  |  45 lines

  1. @echo off
  2. if "%OS%" == "Windows_NT" setlocal
  3. rem ---------------------------------------------------------------------------
  4. rem Stop script for the CATALINA Server
  5. rem
  6. rem $Id: shutdown.bat,v 1.5 2004/05/27 15:05:01 yoavs Exp $
  7. rem ---------------------------------------------------------------------------
  8.  
  9. rem Guess CATALINA_HOME if not defined
  10. set CURRENT_DIR=%cd%
  11. if not "%CATALINA_HOME%" == "" goto gotHome
  12. set CATALINA_HOME=%CURRENT_DIR%
  13. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  14. cd ..
  15. set CATALINA_HOME=%cd%
  16. cd %CURRENT_DIR%
  17. :gotHome
  18. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  19. echo The CATALINA_HOME environment variable is not defined correctly
  20. echo This environment variable is needed to run this program
  21. goto end
  22. :okHome
  23.  
  24. set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
  25.  
  26. rem Check that target executable exists
  27. if exist "%EXECUTABLE%" goto okExec
  28. echo Cannot find %EXECUTABLE%
  29. echo This file is needed to run this program
  30. goto end
  31. :okExec
  32.  
  33. rem Get remaining unshifted command line arguments and save them in the
  34. set CMD_LINE_ARGS=
  35. :setArgs
  36. if ""%1""=="""" goto doneSetArgs
  37. set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  38. shift
  39. goto setArgs
  40. :doneSetArgs
  41.  
  42. call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
  43.  
  44. :end
  45.