From c0493d41a642a6c66ee676cc93c5330468d25b56 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 02 Nov 2011 12:07:15 +0000
Subject: [PATCH] Fix for OPENDJ-222 : Renamed environment variables to OPENDJ_... Updated scripts so that if OPENDJ_JAVA_HOME and OPENDJ_JAVA_ARGS are not defined, we look at the legacy OPENDS_... ones.

---
 opendj-sdk/opends/resource/bin/stop-ds.bat |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/opendj-sdk/opends/resource/bin/stop-ds.bat b/opendj-sdk/opends/resource/bin/stop-ds.bat
index a51ac12..4aeaedb 100644
--- a/opendj-sdk/opends/resource/bin/stop-ds.bat
+++ b/opendj-sdk/opends/resource/bin/stop-ds.bat
@@ -24,19 +24,20 @@
 rem
 rem
 rem      Copyright 2006-2010 Sun Microsystems, Inc.
+rem      Portions Copyright 2011 ForgeRock AS
 
 setlocal
 
 set PATH=%SystemRoot%
 
-set OPENDS_INVOKE_CLASS="org.opends.server.tools.StopDS"
+set OPENDJ_INVOKE_CLASS="org.opends.server.tools.StopDS"
 set SCRIPT_NAME=stop-ds
 for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
 
 rem We keep this values to reset the environment before calling start-ds.
-set ORIGINAL_JAVA_ARGS=%OPENDS_JAVA_ARGS%
-set ORIGINAL_JAVA_HOME=%OPENDS_JAVA_HOME%
-set ORIGINAL_JAVA_BIN=%OPENDS_JAVA_BIN%
+set ORIGINAL_JAVA_ARGS=%OPENDJ_JAVA_ARGS%
+set ORIGINAL_JAVA_HOME=%OPENDJ_JAVA_HOME%
+set ORIGINAL_JAVA_BIN=%OPENDJ_JAVA_BIN%
 
 set INSTALL_ROOT=%DIR_HOME%
 
@@ -64,7 +65,7 @@
 
 echo %SCRIPT%: CLASSPATH=%CLASSPATH% >> %LOG%
 
-"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG%  org.opends.server.tools.StopDS --checkStoppability %*
+"%OPENDJ_JAVA_BIN%" %OPENDJ_JAVA_ARGS% %SCRIPT_NAME_ARG%  org.opends.server.tools.StopDS --checkStoppability %*
 
 if %errorlevel% == 98 goto serverAlreadyStopped
 if %errorlevel% == 99 goto startUsingSystemCall
@@ -86,9 +87,9 @@
 rem Set the original values that the user had on the environment in order to be
 rem sure that the start-ds script works with the proper arguments (in particular
 rem if the user specified not to overwrite the environment).
-set OPENDS_JAVA_ARGS=%ORIGINAL_JAVA_ARGS%
-set OPENDS_JAVA_HOME=%ORIGINAL_JAVA_HOME%
-set OPENDS_JAVA_BIN=%ORIGINAL_JAVA_BIN%
+set OPENDJ_JAVA_ARGS=%ORIGINAL_JAVA_ARGS%
+set OPENDJ_JAVA_HOME=%ORIGINAL_JAVA_HOME%
+set OPENDJ_JAVA_BIN=%ORIGINAL_JAVA_BIN%
 "%INSTALL_ROOT%\bat\start-ds.bat"
 goto writeLastLine
 
@@ -110,16 +111,16 @@
 
 :stopAsWindowsService
 echo %SCRIPT%: stop as windows service >> %LOG%
-"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
+"%OPENDJ_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
 goto end
 
 :restartAsWindowsService
 echo %SCRIPT%: restart as windows service, stopping >> %LOG%
-"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
+"%OPENDJ_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
 if not %errorlevel% == 0 goto end
 echo %SCRIPT%: restart as windows service, starting >> %LOG%
-"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StartWindowsService
-"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice"
+"%OPENDJ_JAVA_BIN%" -client org.opends.server.tools.StartWindowsService
+"%OPENDJ_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice"
 rem Type the contents the winwervice.out file and delete it.
 if exist "%INSTANCE_ROOT%\logs\winservice.out" type "%INSTANCE_ROOT%\logs\winservice.out"
 if exist "%INSTANCE_ROOT%\logs\winservice.out" erase "%INSTANCE_ROOT%\logs\winservice.out"

--
Gitblit v1.10.0