#
# $Id$
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2006-2010 Sun Microsystems, Inc.
# Portions Copyright 2011 ForgeRock AS
# Portions Copyright 2013 Jens Elkner
# This script is used to invoke various server-side processes. It should not
# be invoked directly by end users.
INSTALL_ROOT="${.sh.file%/*/*}"
CHECK=''
typeset -a MISC_ARGS=( )
if [[ -z ${OPENDJ_INVOKE_CLASS} || -z ${SCRIPT_NAME} ]]; then
OIC=''
case "$SCRIPT_NAME" in
dbtest) #link
# debug JE backends in the Directory Server
CHECK='-i'
;;
dsreplication) #link
# perform some replication specific operations
if [[ ${RECURSIVE_LOCAL_CALL} != 'true' ]]; then
SCRIPT_ARGS+=' -Dorg.opends.server.dsreplicationcallstatus=firstcall'
else
fi
;;
# encode clear-text passwords or verify whether a given clear-text
# password matches a provided encoded password
;;
# compare the contents of two LDIF files
;;
ldifmodify) #link
# alter the contents of an LDIF file
;;
ldifsearch) #link
# perform searches in an LDIF file
;;
# perform a restore of a Directory Server backend
CHECK='-i'
;;
# generate LDIF data based on a provided template
#NO_CHECK=1
;;
# rebuild the contents of a Directory Server backend storing its
# data in the Berkeley DB Java Edition
;;
INSTALL_ROOT="${.sh.file%/*}"
CHECK='-i'
;;
# perform validation on the contents of a Directory Server backend
# storing its data in the Berkeley DB Java Edition
CHECK='-i'
;;
esac
fi
if [[ -z ${OPENDJ_INVOKE_CLASS} ]]; then
print -u2 'ERROR: OPENDJ_INVOKE_CLASS environment variable is not set.'
exit 1
fi
# Set environment variables
. "${INSTALL_ROOT}/lib/_script-util.sh"
# Launch the appropriate server utility.
-Dorg.opends.server.InstallRoot="${INSTALL_ROOT}" \
-Dorg.opends.server.InstanceRoot="${INSTANCE_ROOT}" \
${OPENDJ_INVOKE_CLASS} \