uninstall revision 3824
221N/A#!/bin/sh
221N/A#
221N/A# CDDL HEADER START
221N/A#
221N/A# The contents of this file are subject to the terms of the
221N/A# Common Development and Distribution License, Version 1.0 only
221N/A# (the "License"). You may not use this file except in compliance
221N/A# with the License.
221N/A#
221N/A# You can obtain a copy of the license at
221N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
221N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
221N/A# See the License for the specific language governing permissions
221N/A# and limitations under the License.
221N/A#
221N/A# When distributing Covered Code, include this CDDL HEADER in each
221N/A# file and include the License file at
221N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
221N/A# add the following below this CDDL HEADER, with the fields enclosed
221N/A# by brackets "[]" replaced with your own identifying information:
679N/A# Portions Copyright [yyyy] [name of copyright owner]
221N/A#
221N/A# CDDL HEADER END
221N/A#
221N/A#
221N/A# Copyright 2006-2008 Sun Microsystems, Inc.
618N/A
221N/A
221N/A# This script may be used to uninstall the server.
844N/A
844N/A# Capture the current working directory so that we can change to it later.
221N/A# Then capture the location of this script and the Directory Server instance
221N/A# root so that we can use them to create appropriate paths.
221N/AWORKING_DIR=`pwd`
221N/A
221N/Acd "`dirname "${0}"`"
221N/ASCRIPT_DIR=`pwd`
679N/A
679N/ASCRIPT_NAME=uninstall
679N/Aexport SCRIPT_NAME
679N/A
679N/AINSTALL_ROOT=${SCRIPT_DIR}
679N/Aexport INSTALL_ROOT
679N/A
679N/Aif cat ${INSTALL_ROOT}/instance.loc | grep '^/' > /dev/null
221N/Athen
221N/A INSTANCE_ROOT=`cat ${INSTALL_ROOT}/instance.loc`
679N/A export INSTANCE_ROOT
221N/Aelse
221N/A INSTANCE_ROOT=${INSTALL_ROOT}/`cat ${INSTALL_ROOT}/instance.loc`
221N/A export INSTANCE_ROOT
221N/Afi
221N/A
221N/Acd "${WORKING_DIR}"
221N/A
221N/A# Set environment variables
221N/ASCRIPT_UTIL_CMD=set-full-environment-and-test-java
221N/Aexport SCRIPT_UTIL_CMD
221N/A. "${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