0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#!/bin/sh
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# CDDL HEADER START
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# The contents of this file are subject to the terms of the
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# Common Development and Distribution License, Version 1.0 only
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# (the "License"). You may not use this file except in compliance
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# with the License.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# or http://forgerock.org/license/CDDLv1.0.html.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# See the License for the specific language governing permissions
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# and limitations under the License.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# When distributing Covered Code, include this CDDL HEADER in each
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# file and include the License file at legal-notices/CDDLv1_0.txt.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# If applicable, add the following below this CDDL HEADER, with the
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# fields enclosed by brackets "[]" replaced with your own identifying
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# information:
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# Portions Copyright [yyyy] [name of copyright owner]
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# CDDL HEADER END
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson#
62713b44520556f3136c67f8716f905d9a90c463matthew_swift# Copyright 2006-2010 Sun Microsystems, Inc.
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludo# Portions Copyright 2011 ForgeRock AS
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# This script is used to invoke various server-side processes. It should not
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# be invoked directly by end users.
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludoif test -z "${OPENDJ_INVOKE_CLASS}"
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilsonthen
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludo echo "ERROR: OPENDJ_INVOKE_CLASS environment variable is not set."
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson exit 1
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilsonfi
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# Capture the current working directory so that we can change to it later.
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# Then capture the location of this script and the Directory Server instance
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# root so that we can use them to create appropriate paths.
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonWORKING_DIR=`pwd`
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
3cedecd5ea21cca5d9709abf320a2082cd3694e5jvergaracd "`dirname "${0}"`"
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonSCRIPT_DIR=`pwd`
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsoncd ..
014019918f7e3844f558f6159b8d41517254edc2lutoffINSTALL_ROOT=`pwd`
014019918f7e3844f558f6159b8d41517254edc2lutoffexport INSTALL_ROOT
014019918f7e3844f558f6159b8d41517254edc2lutoff
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsoncd "${WORKING_DIR}"
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara# Set environment variables
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraSCRIPT_UTIL_CMD=set-full-environment
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraexport SCRIPT_UTIL_CMD
014019918f7e3844f558f6159b8d41517254edc2lutoff. "${INSTALL_ROOT}/lib/_script-util.sh"
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraRETURN_CODE=$?
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraif test ${RETURN_CODE} -ne 0
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilsonthen
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara exit ${RETURN_CODE}
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilsonfi
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# Launch the appropriate server utility.
0f8553e2af5fc49a510ecfcfc93e66d06713f631ludo"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_ARGS} ${SCRIPT_NAME_ARG} "${OPENDJ_INVOKE_CLASS}" \
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson --configClass org.opends.server.extensions.ConfigFileHandler \
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson --configFile "${INSTANCE_ROOT}/config/config.ldif" "${@}"