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