uninstall revision 3824
15389N/A#!/bin/sh
15389N/A#
15389N/A# CDDL HEADER START
15389N/A#
15389N/A# The contents of this file are subject to the terms of the
15389N/A# Common Development and Distribution License, Version 1.0 only
15389N/A# (the "License"). You may not use this file except in compliance
15389N/A# with the License.
15389N/A#
15389N/A# You can obtain a copy of the license at
15389N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
15389N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
15389N/A# See the License for the specific language governing permissions
17984N/A# and limitations under the License.
15389N/A#
15389N/A# When distributing Covered Code, include this CDDL HEADER in each
15389N/A# file and include the License file at
15389N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
15389N/A# add the following below this CDDL HEADER, with the fields enclosed
15389N/A# by brackets "[]" replaced with your own identifying information:
15455N/A# Portions Copyright [yyyy] [name of copyright owner]
15389N/A#
15389N/A# CDDL HEADER END
15389N/A#
17984N/A#
15389N/A# Copyright 2006-2008 Sun Microsystems, Inc.
15392N/A
15389N/A
15389N/A# This script may be used to uninstall the server.
15389N/A
15389N/A# Capture the current working directory so that we can change to it later.
15389N/A# Then capture the location of this script and the Directory Server instance
15389N/A# root so that we can use them to create appropriate paths.
15389N/AWORKING_DIR=`pwd`
18940N/A
18940N/Acd "`dirname "${0}"`"
18940N/ASCRIPT_DIR=`pwd`
19134N/A
19134N/ASCRIPT_NAME=uninstall
19134N/Aexport SCRIPT_NAME
18940N/A
15392N/AINSTALL_ROOT=${SCRIPT_DIR}
15389N/Aexport INSTALL_ROOT
15389N/A
15392N/Aif cat ${INSTALL_ROOT}/instance.loc | grep '^/' > /dev/null
15392N/Athen
15392N/A INSTANCE_ROOT=`cat ${INSTALL_ROOT}/instance.loc`
15389N/A export INSTANCE_ROOT
15389N/Aelse
15389N/A INSTANCE_ROOT=${INSTALL_ROOT}/`cat ${INSTALL_ROOT}/instance.loc`
export INSTANCE_ROOT
fi
cd "${WORKING_DIR}"
# Set environment variables
SCRIPT_UTIL_CMD=set-full-environment-and-test-java
export SCRIPT_UTIL_CMD
. "${INSTALL_ROOT}/lib/_script-util.sh"
RETURN_CODE=$?
if test ${RETURN_CODE} -ne 0
then
exit ${RETURN_CODE}
fi
# Launch the uninstall process.
"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} org.opends.guitools.uninstaller.UninstallLauncher "${@}"
# return part
RETURN_CODE=$?
if test ${RETURN_CODE} -eq 50
then
# Version info was on requested
exit 0
else
exit ${RETURN_CODE}
fi