start-ds revision 56cd4dcda4eb69f584c8638616e9c14b99664fcb
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# CDDL HEADER START
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# The contents of this file are subject to the terms of the
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Common Development and Distribution License, Version 1.0 only
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# (the "License"). You may not use this file except in compliance
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# with the License.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# You can obtain a copy of the license at
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# See the License for the specific language governing permissions
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# and limitations under the License.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# When distributing Covered Code, include this CDDL HEADER in each
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# file and include the License file at
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# add the following below this CDDL HEADER, with the fields enclosed
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# by brackets "[]" replaced with your own identifying * information:
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Portions Copyright [yyyy] [name of copyright owner]
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# CDDL HEADER END
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Portions Copyright 2006 Sun Microsystems, Inc.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# See if JAVA_HOME is set. If not, then see if there is a java executable in
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# the path and try to figure it out.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeif test -z "${JAVA_BIN}"
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe if test -z "${JAVA_HOME}"
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# system environment variables for security and compatibility reasons.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Capture the current working directory so that we can change to it later.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Then capture the location of this script and the Directory Server instance
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# root so that we can use them to create appropriate paths.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipecd "${WORKING_DIR}"
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Configure the appropriate CLASSPATH.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Specify the locations of important files that may be used when the server
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# is starting.
56cd4dcda4eb69f584c8638616e9c14b99664fcbneil_a_wilson# See if an "-N" or a "--nodetach" argument was provided as a command-line
56cd4dcda4eb69f584c8638616e9c14b99664fcbneil_a_wilson# argument. If it was, then don't use nohup to send to the background, and
56cd4dcda4eb69f584c8638616e9c14b99664fcbneil_a_wilson# send all output to both the console and a lot file.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe echo $$ > "${PID_FILE}"
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe --configClass org.opends.server.extensions.ConfigFileHandler \
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe --configClass org.opends.server.extensions.ConfigFileHandler \
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe --configFile "${CONFIG_FILE}" "${@}" > "${LOG_FILE}" 2>&1 &
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe echo $! > "${PID_FILE}"
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe "${JAVA_BIN}" -Xms8M -Xmx8M org.opends.server.tools.WaitForFileDelete \
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe --targetFile "${STARTING_FILE}" --logFile "${LOG_FILE}"