uninstall revision 014019918f7e3844f558f6159b8d41517254edc2
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus#!/bin/sh
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus#
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# CDDL HEADER START
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus#
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# The contents of this file are subject to the terms of the
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# Common Development and Distribution License, Version 1.0 only
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# (the "License"). You may not use this file except in compliance
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# with the License.
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus#
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# You can obtain a copy of the license at
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# trunk/opends/resource/legal-notices/OpenDS.LICENSE
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# See the License for the specific language governing permissions
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# and limitations under the License.
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus#
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# When distributing Covered Code, include this CDDL HEADER in each
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# file and include the License file at
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5a3bd0ef762b8a3238869ac9963194555e39e6a7jpikus# 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-2008 Sun Microsystems, Inc.
# This script may be used to uninstall the server.
# Capture the current working directory so that we can change to it later.
# Then capture the location of this script and the Directory Server instance
# root so that we can use them to create appropriate paths.
WORKING_DIR=`pwd`
cd "`dirname "${0}"`"
SCRIPT_DIR=`pwd`
SCRIPT_NAME=uninstall
export SCRIPT_NAME
INSTALL_ROOT=${SCRIPT_DIR}
export INSTALL_ROOT
if cat ${INSTALL_ROOT}/instance.loc | grep '^/' > /dev/null
then
INSTANCE_ROOT=`cat ${INSTALL_ROOT}/instance.loc`
export INSTANCE_ROOT
else
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