source: raptor-distribution/MSIs/raptor-web/trunk/source/web/bin/raptorweb.bat @ 1747

Revision 1747, 2.0 KB checked in by rhyssmith, 5 years ago (diff)

Adding raptor-web v1.2.1 MSI sources

  • Property svn:executable set to *
Line 
1@echo off
2setlocal
3
4rem Copyright (c) 1999, 2006 Tanuki Software Inc.
5rem
6rem Java Service Wrapper command based script
7rem
8
9if "%OS%"=="Windows_NT" goto nt
10echo This script only works with NT-based versions of Windows.
11goto :eof
12
13:nt
14rem
15rem Find the application home.
16rem
17rem %~dp0 is location of current script under NT
18set _REALPATH=%~dp0
19
20rem Decide on the wrapper binary.
21set _WRAPPER_BASE=wrapper
22set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
23if exist "%_WRAPPER_EXE%" goto validate
24set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
25if exist "%_WRAPPER_EXE%" goto validate
26set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
27if exist "%_WRAPPER_EXE%" goto validate
28echo Unable to locate a Wrapper executable using any of the following names:
29echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
30echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
31echo %_REALPATH%%_WRAPPER_BASE%.exe
32pause
33goto :eof
34
35:validate
36rem Find the requested command.
37for /F %%v in ('echo %1^|findstr "^console$ ^start$ ^pause$ ^resume$ ^stop$ ^restart$ ^install$ ^remove"') do call :exec set COMMAND=%%v
38
39if "%COMMAND%" == "" (
40    echo Usage: %0 { console : start : pause : resume : stop : restart : install : remove }
41    pause
42    goto :eof
43) else (
44    shift
45)
46
47rem
48rem Find the wrapper.conf
49rem
50:conf
51set _WRAPPER_CONF="%_REALPATH%raptorweb-wrapper.conf"
52
53rem
54rem Run the application.
55rem At runtime, the current directory will be that of wrapper.exe
56rem
57call :%COMMAND%
58if errorlevel 1 pause
59goto :eof
60
61:console
62"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
63goto :eof
64
65:start
66"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
67goto :eof
68
69:pause
70"%_WRAPPER_EXE%" -a %_WRAPPER_CONF%
71goto :eof
72
73:resume
74"%_WRAPPER_EXE%" -e %_WRAPPER_CONF%
75goto :eof
76
77:stop
78"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
79goto :eof
80
81:install
82"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
83goto :eof
84
85:remove
86"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
87goto :eof
88
89:restart
90call :stop
91call :start
92goto :eof
93
94:exec
95%*
96goto :eof
Note: See TracBrowser for help on using the repository browser.