uninstall revision 6331
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#!/bin/ksh93
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#
5f51fad3083fb2ccb6b3789297febd005d98f313Ryan Grove# CDDL HEADER START
2f793e175f5644c75cc847fdcdb0eaa54ce9b09dRyan Grove#
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# The contents of this file are subject to the terms of the
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Common Development and Distribution License, Version 1.0 only
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# (the "License"). You may not use this file except in compliance
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# with the License.
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# You can obtain a copy of the license at
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# trunk/opends/resource/legal-notices/OpenDS.LICENSE
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# See the License for the specific language governing permissions
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# and limitations under the License.
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# When distributing Covered Code, include this CDDL HEADER in each
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# file and include the License file at
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# add the following below this CDDL HEADER, with the fields enclosed
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# by brackets "[]" replaced with your own identifying information:
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Portions Copyright [yyyy] [name of copyright owner]
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# CDDL HEADER END
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove#
fff436c1083b8b7797a5722b6569974acd2530d3Ryan Grove#
fff436c1083b8b7797a5722b6569974acd2530d3Ryan Grove# Copyright 2006-2008 Sun Microsystems, Inc.
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Portions Copyright 2011 ForgeRock AS
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Portions Copyright 2013 Jens Elkner
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# This script may be used to uninstall the server.
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove[[ ${FNTRACE} == 'ALL' || ${FNTRACE} == 'main' ]] && set -x
98d28edc616f4055ccd4574e9122458246adb214Ryan GroveINSTALL_ROOT="${.sh.file%/*}" SCRIPT_NAME=uninstall
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Set env vars
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove. "${INSTALL_ROOT}"/lib/_script-util.sh
98d28edc616f4055ccd4574e9122458246adb214Ryan GrovecheckEnv -i 'set-full-environment-and-test-java' "$@"
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove# Launch the uninstall process
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
98d28edc616f4055ccd4574e9122458246adb214Ryan Grove -Dorg.opends.server.InstallRoot="${INSTALL_ROOT}" \
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Grove -Dorg.opends.server.InstanceRoot="${INSTANCE_ROOT}" \
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Grove org.opends.guitools.uninstaller.UninstallLauncher "${@}"
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Grove
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan GroveRC=$?
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Grove(( ${RC} == 50 )) && exit 0 # Version info was requested
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Groveexit ${RC}
145e98f44d72e1da8d92fae21d694b6c91be5bb8Ryan Grove