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