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