2N/Arem CDDL HEADER START
2N/Arem The contents of this file are subject to the terms of the
2N/Arem Common Development and Distribution License, Version 1.0 only
2N/Arem (the "License"). You may not use this file except in compliance
2N/Arem with the License.
2N/Arem You can obtain a copy of the license at
2N/Arem See the License for the specific language governing permissions
2N/Arem and limitations under the License.
2N/Arem When distributing Covered Code, include this CDDL HEADER in each
2N/Arem file and include the License file at
2N/Arem add the following below this CDDL HEADER, with the fields enclosed
2N/Arem by brackets "[]" replaced with your own identifying * information:
2N/Arem Portions Copyright [yyyy] [name of copyright owner]
2N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
2N/Aset PATH=%SystemRoot%
2N/Aif "%JAVA_BIN%" == "" goto noJavaBin
2N/Aif "%JAVA_HOME%" == "" goto noJavaHome
2N/Aecho Error: JAVA_HOME environment variable is not set.
2N/Aecho Please set it to a valid Java 5 installation.
2N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\bin\
setcp.bat" %%x
2N/Aset NO_ARG_OR_ONLY_RESTART=1
2N/Afor %%x in (%*) DO set NO_ARG_OR_ONLY_RESTART=0
2N/Aif "%NO_ARG_OR_ONLY_RESTART%" == "1" goto execute
2N/Afor %%x in (%*) DO if "%%x" == "-R" set RESTART=1
2N/Afor %%x in (%*) DO if "%%x" == "--restart" set RESTART=1
2N/Aif not "%1" == "-R" goto testParameter1b
2N/Aif not "%1" == "--restart" goto execute
2N/Aif "%2" == "" set NO_ARG_OR_ONLY_RESTART=1
2N/Aif "%NO_ARG_OR_ONLY_RESTART%" == "1" goto execute
2N/Aif not "%2" == "-R" goto testParameter2b
2N/Aif not "%2" == "--restart" goto execute
2N/Aif not "%3" == "" goto execute
2N/Aset NO_ARG_OR_ONLY_RESTART=1
2N/Aif "%NO_ARG_OR_ONLY_RESTART%" == "0" goto stopWithLDAP
2N/Arem Use the code in StopDS class to know if the server is already
2N/Arem stopped. An exit code of 99 means that the server is stopped.
2N/Aif %errorlevel% == 99 goto serverStopped
2N/Aif not %errorlevel% == 0 goto end