uninstall revision a3d3ab94806056d2355afea6fe8daac41059b9fb
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#!/bin/sh
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# CDDL HEADER START
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# The contents of this file are subject to the terms of the
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# Common Development and Distribution License, Version 1.0 only
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# (the "License"). You may not use this file except in compliance
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# with the License.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# You can obtain a copy of the license at
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# trunk/opends/resource/legal-notices/OpenDS.LICENSE
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# See the License for the specific language governing permissions
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# and limitations under the License.
8013147372959d2435f1f8b0305057cfce308168Jason Lemay#
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# When distributing Covered Code, include this CDDL HEADER in each
4eb529f0471672590d77cf89ef23987ba2c95ff4Laszlo Hordos# file and include the License file at
4eb529f0471672590d77cf89ef23987ba2c95ff4Laszlo Hordos# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# add the following below this CDDL HEADER, with the fields enclosed
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# by brackets "[]" replaced with your own identifying information:
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# Portions Copyright [yyyy] [name of copyright owner]
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan# CDDL HEADER END
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan#
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel#
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel# Copyright 2006-2008 Sun Microsystems, Inc.
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel
b564baaca75789be41eba24bb96e31f3ce5b10eeJake Feasel# This script may be used to uninstall the server.
5d0f143a8ead3cd79919f648b4a899e348902143Jake Feasel
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel# Capture the current working directory so that we can change to it later.
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel# Then capture the location of this script and the Directory Server instance
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel# root so that we can use them to create appropriate paths.
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake FeaselWORKING_DIR=`pwd`
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feaselcd `dirname "${0}"`
1965c5d21403c3d66eb1efa29c670378311b1077Paul BryanSCRIPT_DIR=`pwd`
54f30b716553d88ea9ebb010037f4c74eb1d69acPaul Bryan
1965c5d21403c3d66eb1efa29c670378311b1077Paul BryanSCRIPT_NAME=uninstall
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosexport SCRIPT_NAME
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo HordosINSTANCE_ROOT=${SCRIPT_DIR}
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordosexport INSTANCE_ROOT
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos
0389b442e8bd8d112b977faae238cc8bb66201e2Bruno Lavitcd "${WORKING_DIR}"
0389b442e8bd8d112b977faae238cc8bb66201e2Bruno Lavit
f1aa66113fa700d874f2c4c38e87c6ce44dae232Bruno Lavit# Set environment variables
f1aa66113fa700d874f2c4c38e87c6ce44dae232Bruno LavitSCRIPT_UTIL_CMD=set-full-environment-and-test-java
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feaselexport SCRIPT_UTIL_CMD
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel. "${INSTANCE_ROOT}/lib/_script-util.sh"
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake FeaselRETURN_CODE=$?
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feaselif test ${RETURN_CODE} -ne 0
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feaselthen
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel exit ${RETURN_CODE}
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feaselfi
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel# Launch the uninstall process.
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} org.opends.guitools.uninstaller.UninstallLauncher "${@}"
3f09f5b4acc8cefb61799cd3bb7b34dea90d1958Jake Feasel
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos# return part
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo HordosRETURN_CODE=$?
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosif test ${RETURN_CODE} -eq 50
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosthen
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos # Version info was on requested
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos exit 0
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordoselse
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos exit ${RETURN_CODE}
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordosfi
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos