uninstall revision 27f8adec83293fb8bd3bfa37175322b0ee3bb933
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#!/bin/sh
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# CDDL HEADER START
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# The contents of this file are subject to the terms of the
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# Common Development and Distribution License, Version 1.0 only
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# (the "License"). You may not use this file except in compliance
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# with the License.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# You can obtain a copy of the license at
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# trunk/opends/resource/legal-notices/OpenDS.LICENSE
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# See the License for the specific language governing permissions
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# and limitations under the License.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# When distributing Covered Code, include this CDDL HEADER in each
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# file and include the License file at
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# add the following below this CDDL HEADER, with the fields enclosed
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# by brackets "[]" replaced with your own identifying information:
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# Portions Copyright [yyyy] [name of copyright owner]
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# CDDL HEADER END
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift#
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# Portions Copyright 2006-2007 Sun Microsystems, Inc.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# This script may be used to uninstall the server.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
950dae14045dfafef39e115efea5af8a78779bc9matthew_swift# Capture the current working directory so that we can change to it later.
53247d28ba99538f841a13ea2cde01c3faa3ef36kenneth_suter# Then capture the location of this script and the Directory Server instance
950dae14045dfafef39e115efea5af8a78779bc9matthew_swift# root so that we can use them to create appropriate paths.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftWORKING_DIR=`pwd`
4745cef5e673ef034ac19ce073b33271c13ce059matthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftcd `dirname "${0}"`
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftSCRIPT_DIR=`pwd`
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftSCRIPT_NAME=uninstall
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftexport SCRIPT_NAME
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftINSTANCE_ROOT=${SCRIPT_DIR}
950dae14045dfafef39e115efea5af8a78779bc9matthew_swiftexport INSTANCE_ROOT
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftcd "${WORKING_DIR}"
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# Set environment variables
950dae14045dfafef39e115efea5af8a78779bc9matthew_swiftSCRIPT_UTIL_CMD=set-full-environment-and-test-java
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftexport SCRIPT_UTIL_CMD
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift. "${INSTANCE_ROOT}/lib/_script-util.sh"
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftRETURN_CODE=$?
950dae14045dfafef39e115efea5af8a78779bc9matthew_swiftif test ${RETURN_CODE} -ne 0
950dae14045dfafef39e115efea5af8a78779bc9matthew_swiftthen
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift exit ${RETURN_CODE}
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftfi
4745cef5e673ef034ac19ce073b33271c13ce059matthew_swift
31321180d237d7ddc9b945df1a8fe896c69749edmatthew_swift# Launch the uninstall process.
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} org.opends.guitools.uninstaller.UninstallLauncher "${@}"
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift# return part
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftRETURN_CODE=$?
cadc79e355f7f3210df3214d974f6880a43025abneil_a_wilsonif test ${RETURN_CODE} -eq 50
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftthen
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift # Version info was on requested
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift exit 0
707e0e01b90aa93972ca8c16f655685da6cde6edlutoffelse
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swift exit ${RETURN_CODE}
c7adcf7755f9492075a6cc9ad913a0c5a3d2d46cmatthew_swiftfi
950dae14045dfafef39e115efea5af8a78779bc9matthew_swift