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