_server-script.sh revision a3d3ab94806056d2355afea6fe8daac41059b9fb
4021N/A#!/bin/sh
4021N/A#
4021N/A# CDDL HEADER START
4192N/A#
4192N/A# The contents of this file are subject to the terms of the
4192N/A# Common Development and Distribution License, Version 1.0 only
4192N/A# (the "License"). You may not use this file except in compliance
4192N/A# with the License.
4192N/A#
4192N/A# You can obtain a copy of the license at
4192N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
4192N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
4192N/A# See the License for the specific language governing permissions
4192N/A# and limitations under the License.
4192N/A#
4192N/A# When distributing Covered Code, include this CDDL HEADER in each
4192N/A# file and include the License file at
4192N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
4192N/A# add the following below this CDDL HEADER, with the fields enclosed
4192N/A# by brackets "[]" replaced with your own identifying information:
4192N/A# Portions Copyright [yyyy] [name of copyright owner]
4192N/A#
4192N/A# CDDL HEADER END
4192N/A#
4192N/A#
4192N/A# Copyright 2006-2008 Sun Microsystems, Inc.
4192N/A
5621N/A
4192N/A# This script is used to invoke various server-side processes. It should not
4167N/A# be invoked directly by end users.
4192N/Aif test -z "${OPENDS_INVOKE_CLASS}"
4021N/Athen
4021N/A echo "ERROR: OPENDS_INVOKE_CLASS environment variable is not set."
4167N/A exit 1
4021N/Afi
4021N/A
4021N/A
4021N/A# Capture the current working directory so that we can change to it later.
4021N/A# Then capture the location of this script and the Directory Server instance
4021N/A# root so that we can use them to create appropriate paths.
4021N/AWORKING_DIR=`pwd`
4021N/A
4021N/Acd `dirname "${0}"`
4021N/ASCRIPT_DIR=`pwd`
4021N/A
4021N/Acd ..
4021N/AINSTANCE_ROOT=`pwd`
4021N/Aexport INSTANCE_ROOT
4021N/A
4021N/Acd "${WORKING_DIR}"
4021N/A
4021N/A# Set environment variables
4021N/ASCRIPT_UTIL_CMD=set-full-environment
4021N/Aexport SCRIPT_UTIL_CMD
4021N/A. "${INSTANCE_ROOT}/lib/_script-util.sh"
4021N/ARETURN_CODE=$?
4021N/Aif test ${RETURN_CODE} -ne 0
4021N/Athen
4021N/A exit ${RETURN_CODE}
4021N/Afi
4021N/A
4021N/A# Launch the appropriate server utility.
4021N/A"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} "${OPENDS_INVOKE_CLASS}" \
4021N/A --configClass org.opends.server.extensions.ConfigFileHandler \
4021N/A --configFile "${INSTANCE_ROOT}/config/config.ldif" "${@}"
4021N/A