_mixed-script.bat revision a3d3ab94806056d2355afea6fe8daac41059b9fb
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff@echo off
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem CDDL HEADER START
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem The contents of this file are subject to the terms of the
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem Common Development and Distribution License, Version 1.0 only
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem (the "License"). You may not use this file except in compliance
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem with the License.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem You can obtain a copy of the license at
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem trunk/opends/resource/legal-notices/OpenDS.LICENSE
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem See the License for the specific language governing permissions
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem and limitations under the License.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem When distributing Covered Code, include this CDDL HEADER in each
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem file and include the License file at
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem add the following below this CDDL HEADER, with the fields enclosed
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem by brackets "[]" replaced with your own identifying information:
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem Portions Copyright [yyyy] [name of copyright owner]
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem CDDL HEADER END
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem Copyright 2006-2008 Sun Microsystems, Inc.
a5b9f8fb834b1b2208e59a2fa76714bd91a5f147violette
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem This script is used to invoke various server-side processes. It should not
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffrem be invoked directly by end users.
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludosetlocal
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludofor %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffset INSTANCE_ROOT=%DIR_HOME%
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffif "%OPENDS_INVOKE_CLASS%" == "" goto noInvokeClass
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffset OLD_SCRIPT_NAME=%SCRIPT_NAME%
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffset SCRIPT_NAME=%OLD_SCRIPT_NAME%.online
set SCRIPT_UTIL_CMD=set-full-environment
call "%INSTANCE_ROOT%\lib\_script-util.bat"
if NOT %errorlevel% == 0 exit /B %errorlevel%
set SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=%OLD_SCRIPT_NAME%"
rem Check whether is local or remote
"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% %OPENDS_INVOKE_CLASS% --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" --testIfOffline %*
if %errorlevel% == 51 goto launchoffline
if %errorlevel% == 52 goto launchonline
exit /B %errorlevel%
:noInvokeClass
echo Error: OPENDS_INVOKE_CLASS environment variable is not set.
pause
goto end
:launchonline
"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% %OPENDS_INVOKE_CLASS% --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
goto end
:launchoffline
set SCRIPT_NAME=%OLD_SCRIPT_NAME%.offline
set SCRIPT_UTIL_CMD=set-full-environment
call "%INSTANCE_ROOT%\lib\_script-util.bat"
if NOT %errorlevel% == 0 exit /B %errorlevel%
set SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=%OLD_SCRIPT_NAME%"
"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% %OPENDS_INVOKE_CLASS% --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
goto end
:end