knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-320: Simplify scripts for using Knox on windows (v2). (cherry picked from commit 0a716a7657f632afa6fcbac6535064d9d8e70bac)
Date Tue, 25 Mar 2014 04:07:10 GMT
Repository: knox
Updated Branches:
  refs/heads/master 83fe6647f -> 0e1df0f87


KNOX-320: Simplify scripts for using Knox on windows (v2).
(cherry picked from commit 0a716a7657f632afa6fcbac6535064d9d8e70bac)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/0e1df0f8
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/0e1df0f8
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/0e1df0f8

Branch: refs/heads/master
Commit: 0e1df0f872d2d9640823d192e82a291596c930b3
Parents: 83fe664
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Tue Mar 25 00:06:28 2014 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Tue Mar 25 00:06:58 2014 -0400

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.cmd | 20 +++++++++++++-------
 gateway-release/home/bin/ldap.cmd    | 26 +++++++++++++++-----------
 2 files changed, 28 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/0e1df0f8/gateway-release/home/bin/gateway.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.cmd b/gateway-release/home/bin/gateway.cmd
index d96932d..306644c 100644
--- a/gateway-release/home/bin/gateway.cmd
+++ b/gateway-release/home/bin/gateway.cmd
@@ -22,14 +22,20 @@ set APP_JAR=%APP_BIN_DIR%gateway.jar
 
 if not exist "%JAVA_HOME%"\bin\java.exe (
   echo Error: JAVA_HOME is incorrectly set.
-  exit /B 1
+  exit /b 1
 )
-set JAVA="%JAVA_HOME%"\bin\java
+set JAVA=%JAVA_HOME%\bin\java
 
-"%JAVA%" -jar "%APP_JAR%"
-
-if not %ERRORLEVEL% == 0 (
-  exit /B %ERRORLEVEL%
+if "%1" == "--service" (
+  echo ^<service^>
+  echo   ^<id^>knox-gateway^</id^>
+  echo   ^<name^>knox-gateway^</name^>
+  echo   ^<description^>This service runs the Knox Gateway^</description^>
+  echo   ^<executable^>%JAVA%^</executable^>
+  echo   ^<arguments^>-jar "%APP_JAR%"^</arguments^>
+  echo ^</service^>
+  exit /b 0
 )
 
-exit /B 0
+"%JAVA%" -jar "%APP_JAR%"
+exit /b %ERRORLEVEL%
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/0e1df0f8/gateway-release/home/bin/ldap.cmd
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/ldap.cmd b/gateway-release/home/bin/ldap.cmd
index 8e0b064..b3c4539 100644
--- a/gateway-release/home/bin/ldap.cmd
+++ b/gateway-release/home/bin/ldap.cmd
@@ -14,7 +14,7 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM See the License for the specific language governing permissions and
 REM limitations under the License.
 
-REM Start/stop script location
+REM Script location
 set APP_BIN_DIR=%~dp0
 
 REM  The app's home dir
@@ -28,16 +28,20 @@ set APP_JAR=%APP_BIN_DIR%ldap.jar
 
 if not exist "%JAVA_HOME%"\bin\java.exe (
   echo Error: JAVA_HOME is incorrectly set.
-  exit /B 1
+  exit /b 1
 )
-set JAVA="%JAVA_HOME%"\bin\java
-
-"%JAVA%" -jar "%APP_JAR%" "%APP_CONF_DIR%"
-
-if not %ERRORLEVEL% == 0 (
-  exit /B %ERRORLEVEL%
+set JAVA=%JAVA_HOME%\bin\java
+
+if "%1" == "--service" (
+  @echo ^<service^>
+  @echo   ^<id^>knox-demo-ldap^</id^>
+  @echo   ^<name^>knox-demo-ldap^</name^>
+  @echo   ^<description^>This service runs the Knox demonstration LDAP server^</description^>
+  @echo   ^<executable^>%JAVA%^</executable^>
+  @echo   ^<arguments^>-jar "%APP_JAR%" "%APP_CONF_DIR%"^</arguments^>
+  @echo ^</service^>
+  exit /b 0
 )
 
-exit /B 0
-
-
+"%JAVA%" -jar "%APP_JAR%" "%APP_CONF_DIR%"
+exit /b %ERRORLEVEL%
\ No newline at end of file


Mime
View raw message