start-ds revision 3488
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# CDDL HEADER START
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# The contents of this file are subject to the terms of the
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Common Development and Distribution License, Version 1.0 only
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# (the "License"). You may not use this file except in compliance
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# with the License.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# You can obtain a copy of the license at
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# trunk/opends/resource/legal-notices/OpenDS.LICENSE
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# See the License for the specific language governing permissions
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# and limitations under the License.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# file and include the License file at
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# add the following below this CDDL HEADER, with the fields enclosed
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# by brackets "[]" replaced with your own identifying information:
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Portions Copyright [yyyy] [name of copyright owner]
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# CDDL HEADER END
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Copyright 2006-2008 Sun Microsystems, Inc.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Capture the current working directory so that we can change to it later.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Then capture the location of this script and the Directory Server instance
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# root so that we can use them to create appropriate paths.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amorecd "${WORKING_DIR}"
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Specify the locations of important files that may be used when the server
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# is starting.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreCONFIG_FILE=${INSTANCE_ROOT}/config/config.ldif
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreSTARTING_FILE=${INSTANCE_ROOT}/logs/server.starting
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Specify the script name so that it may be provided in command-line usage.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# Set environment variables
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'AmoreSCRIPT_UTIL_CMD=set-full-environment-and-test-java
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore. "${INSTANCE_ROOT}/lib/_script-util.sh"
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# See if the provided set of arguments were sufficient for us to be able to
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# start the server or perform the requested operation. An exit code of 99
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# means that it should be possible to start the server. An exit code of 98
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# means that the server is already running and we shouldn't try to start it.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# An exit code of anything else means that we're not trying to start the server
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore# and we can just exit with that exit code.
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore --configClass org.opends.server.extensions.ConfigFileHandler \
49ef7e0638c8b771d8a136eae78b1c0f99acc8e0Garrett D'Amore --configFile "${CONFIG_FILE}" --checkStartability "${@}"
EC=${?}
EC=${?}
exit ${EC}