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