digest.bat 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @echo off
  2. rem Licensed to the Apache Software Foundation (ASF) under one or more
  3. rem contributor license agreements. See the NOTICE file distributed with
  4. rem this work for additional information regarding copyright ownership.
  5. rem The ASF licenses this file to You under the Apache License, Version 2.0
  6. rem (the "License"); you may not use this file except in compliance with
  7. rem the License. You may obtain a copy of the License at
  8. rem
  9. rem http://www.apache.org/licenses/LICENSE-2.0
  10. rem
  11. rem Unless required by applicable law or agreed to in writing, software
  12. rem distributed under the License is distributed on an "AS IS" BASIS,
  13. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. rem See the License for the specific language governing permissions and
  15. rem limitations under the License.
  16. rem ---------------------------------------------------------------------------
  17. rem Script to digest password using the algorithm specified
  18. rem ---------------------------------------------------------------------------
  19. setlocal
  20. rem Guess CATALINA_HOME if not defined
  21. set "CURRENT_DIR=%cd%"
  22. if not "%CATALINA_HOME%" == "" goto gotHome
  23. set "CATALINA_HOME=%CURRENT_DIR%"
  24. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  25. cd ..
  26. set "CATALINA_HOME=%cd%"
  27. cd "%CURRENT_DIR%"
  28. :gotHome
  29. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  30. echo The CATALINA_HOME environment variable is not defined correctly
  31. echo This environment variable is needed to run this program
  32. goto end
  33. :okHome
  34. set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
  35. rem Check that target executable exists
  36. if exist "%EXECUTABLE%" goto okExec
  37. echo Cannot find "%EXECUTABLE%"
  38. echo This file is needed to run this program
  39. goto end
  40. :okExec
  41. rem Get remaining unshifted command line arguments and save them in the
  42. set CMD_LINE_ARGS=
  43. :setArgs
  44. if ""%1""=="""" goto doneSetArgs
  45. set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  46. shift
  47. goto setArgs
  48. :doneSetArgs
  49. call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
  50. :end