You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stop.bat 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @echo off
  2. rem
  3. rem
  4. rem Licensed to the Apache Software Foundation (ASF) under one or more
  5. rem contributor license agreements. See the NOTICE file distributed with
  6. rem this work for additional information regarding copyright ownership.
  7. rem The ASF licenses this file to You under the Apache License, Version 2.0
  8. rem (the "License"); you may not use this file except in compliance with
  9. rem the License. You may obtain a copy of the License at
  10. rem
  11. rem http://www.apache.org/licenses/LICENSE-2.0
  12. rem
  13. rem Unless required by applicable law or agreed to in writing, software
  14. rem distributed under the License is distributed on an "AS IS" BASIS,
  15. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. rem See the License for the specific language governing permissions and
  17. rem limitations under the License.
  18. rem
  19. if not "%ECHO%" == "" echo %ECHO%
  20. setlocal
  21. set DIRNAME=%~dp0%
  22. set PROGNAME=%~nx0%
  23. set ARGS=%*
  24. rem Sourcing environment settings for karaf similar to tomcats setenv
  25. SET KARAF_SCRIPT="stop.bat"
  26. if exist "%DIRNAME%setenv.bat" (
  27. call "%DIRNAME%setenv.bat"
  28. )
  29. rem Check console window title. Set to Karaf by default
  30. if not "%KARAF_TITLE%" == "" (
  31. title %KARAF_TITLE%
  32. ) else (
  33. title Karaf
  34. )
  35. goto BEGIN
  36. :warn
  37. echo %PROGNAME%: %*
  38. goto :EOF
  39. :BEGIN
  40. rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  41. if not "%KARAF_HOME%" == "" (
  42. call :warn Ignoring predefined value for KARAF_HOME
  43. )
  44. set KARAF_HOME=%DIRNAME%..
  45. if not exist "%KARAF_HOME%" (
  46. call :warn KARAF_HOME is not valid: "%KARAF_HOME%"
  47. goto END
  48. )
  49. if not "%KARAF_BASE%" == "" (
  50. if not exist "%KARAF_BASE%" (
  51. call :warn KARAF_BASE is not valid: "%KARAF_BASE%"
  52. goto END
  53. )
  54. )
  55. if "%KARAF_BASE%" == "" (
  56. set "KARAF_BASE=%KARAF_HOME%"
  57. )
  58. if not "%KARAF_DATA%" == "" (
  59. if not exist "%KARAF_DATA%" (
  60. call :warn KARAF_DATA is not valid: "%KARAF_DATA%"
  61. goto END
  62. )
  63. )
  64. if "%KARAF_DATA%" == "" (
  65. set "KARAF_DATA=%KARAF_BASE%\data"
  66. )
  67. if not "%KARAF_ETC%" == "" (
  68. if not exist "%KARAF_ETC%" (
  69. call :warn KARAF_ETC is not valid: "%KARAF_ETC%"
  70. goto END
  71. )
  72. )
  73. if "%KARAF_ETC%" == "" (
  74. set "KARAF_ETC=%KARAF_BASE%\etc"
  75. )
  76. :EXECUTE
  77. "%KARAF_HOME%\bin\karaf.bat" stop
  78. rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  79. :END
  80. endlocal
  81. if not "%PAUSE%" == "" pause
  82. :END_NO_PAUSE