Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 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 |
|
| 17 | if "%OS%" == "Windows_NT" setlocal
|
| 18 | rem ---------------------------------------------------------------------------
|
| 19 | rem Script to digest password using the algorithm specified
|
| 20 | rem ---------------------------------------------------------------------------
|
| 21 |
|
| 22 | rem Guess CATALINA_HOME if not defined
|
| 23 | if not "%CATALINA_HOME%" == "" goto gotHome
|
| 24 | set CATALINA_HOME=.
|
| 25 | if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
| 26 | set CATALINA_HOME=..
|
| 27 | :gotHome
|
| 28 | if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
| 29 | echo The CATALINA_HOME environment variable is not defined correctly
|
| 30 | echo This environment variable is needed to run this program
|
| 31 | goto end
|
| 32 | :okHome
|
| 33 |
|
| 34 | set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
|
| 35 |
|
| 36 | rem Check that target executable exists
|
| 37 | if exist "%EXECUTABLE%" goto okExec
|
| 38 | echo Cannot find "%EXECUTABLE%"
|
| 39 | echo This file is needed to run this program
|
| 40 | goto end
|
| 41 | :okExec
|
| 42 |
|
| 43 | rem Get remaining unshifted command line arguments and save them in the
|
| 44 | set CMD_LINE_ARGS=
|
| 45 | :setArgs
|
| 46 | if ""%1""=="""" goto doneSetArgs
|
| 47 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
| 48 | shift
|
| 49 | goto setArgs
|
| 50 | :doneSetArgs
|
| 51 |
|
| 52 | call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
|
| 53 |
|
| 54 | :end
|