start-ds.bat revision 873
0N/A
0N/A@echo off
0N/Arem CDDL HEADER START
0N/Arem
0N/Arem The contents of this file are subject to the terms of the
0N/Arem Common Development and Distribution License, Version 1.0 only
0N/Arem (the "License"). You may not use this file except in compliance
0N/Arem with the License.
0N/Arem
0N/Arem You can obtain a copy of the license at
0N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/Arem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/Arem See the License for the specific language governing permissions
0N/Arem and limitations under the License.
0N/Arem
0N/Arem When distributing Covered Code, include this CDDL HEADER in each
0N/Arem file and include the License file at
0N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/Arem add the following below this CDDL HEADER, with the fields enclosed
873N/Arem by brackets "[]" replaced with your own identifying information:
0N/Arem Portions Copyright [yyyy] [name of copyright owner]
0N/Arem
0N/Arem CDDL HEADER END
0N/Arem
0N/Arem
828N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
0N/A
0N/Asetlocal
0N/A
0N/Aset DIR_HOME=%~dP0..
0N/Aset INSTANCE_ROOT=%DIR_HOME%
0N/A
619N/A:checkJavaBin
0N/Aif "%JAVA_BIN%" == "" goto noJavaBin
0N/Agoto setClassPath
0N/A
0N/A:noJavaBin
0N/Aif "%JAVA_HOME%" == "" goto noJavaHome
0N/Aif not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
481N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
0N/Agoto setClassPath
0N/A
0N/A:noJavaHome
619N/Aif not exist "%DIR_HOME%\bin\set-java-home.bat" goto noSetJavaHome
619N/Acall "%DIR_HOME%\bin\set-java-home.bat"
619N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
619N/Agoto setClassPath
619N/A
619N/A:noSetJavaHome
0N/Aecho Error: JAVA_HOME environment variable is not set.
0N/Aecho Please set it to a valid Java 5 installation.
0N/Agoto end
0N/A
0N/A:setClassPath
415N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\bin\setcp.bat" %%x
0N/A
481N/Aset PATH=%SystemRoot%
0N/A
619N/Aset SCRIPT_NAME_ARG=-Dorg.opends.server.scriptName=start-ds
536N/A
502N/Aset NODETACH=0
502N/Afor %%x in (%*) DO if "%%x" == "-N" set NODETACH=1
502N/Afor %%x in (%*) DO if "%%x" == "--nodetach" set NODETACH=1
502N/A
502N/Aif "%NODETACH%" == "1" goto runNoDetach
502N/Agoto runDetach
502N/A
502N/A
502N/A:runNoDetach
502N/Aif not exist "%DIR_HOME%\logs\server.out" echo. > "%DIR_HOME%\logs\server.out"
502N/Aif not exist "%DIR_HOME%\logs\server.starting" echo. > "%DIR_HOME%\logs\server.starting"
720N/A"%JAVA_BIN%" %JAVA_ARGS% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
502N/Agoto end
502N/A
502N/A
502N/A:runDetach
831N/A"%JAVA_BIN%" %JAVA_ARGS% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" --checkStartability %*
831N/Aif not %errorlevel% == 99 goto end
481N/Aif not exist "%DIR_HOME%\logs\server.out" echo. > "%DIR_HOME%\logs\server.out"
481N/Aif not exist "%DIR_HOME%\logs\server.starting" echo. > "%DIR_HOME%\logs\server.starting"
828N/A"%DIR_HOME%\lib\winlauncher.exe" start "%DIR_HOME%" "%JAVA_BIN%" %JAVA_ARGS% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
481N/A"%JAVA_BIN%" -Xms8M -Xmx8M org.opends.server.tools.WaitForFileDelete --targetFile "%DIR_HOME%\logs\server.starting" --logFile "%DIR_HOME%\logs\server.out"
502N/Agoto end
0N/A
0N/A
0N/A:end
0N/A