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