uninstall revision c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# CDDL HEADER START
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# The contents of this file are subject to the terms of the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Common Development and Distribution License, Version 1.0 only
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# (the "License"). You may not use this file except in compliance
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# with the License.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# You can obtain a copy of the license at
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# trunk/opends/resource/legal-notices/OpenDS.LICENSE
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# See the License for the specific language governing permissions
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# and limitations under the License.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# When distributing Covered Code, include this CDDL HEADER in each
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# file and include the License file at
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# add the following below this CDDL HEADER, with the fields enclosed
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# by brackets "[]" replaced with your own identifying * information:
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Portions Copyright [yyyy] [name of copyright owner]
9cd928fe5e3ea4e05f64cfb380beb54b2623e7dcAlan Maguire# CDDL HEADER END
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Portions Copyright 2006 Sun Microsystems, Inc.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# See if JAVA_HOME is set. If not, then see if there is a java executable in
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# the path and try to figure it out.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazaif test -z "${JAVA_BIN}"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza if test -z "${JAVA_HOME}"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza if test -f "${INSTANCE_ROOT}/bin/set-java-home"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza . "${INSTANCE_ROOT}/bin/set-java-home"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# system environment variables for security and compatibility reasons.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazaexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
afab0816ecb604f0099a09ad8ee398f0d7b77b1cRobert Mustacchi# Capture the current working directory so that we can change to it later.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Then capture the location of this script and the Directory Server instance
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# root so that we can use them to create appropriate paths.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazacd "${WORKING_DIR}"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Configure the appropriate CLASSPATH to test.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Determine whether the detected Java environment is acceptable for use.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazaif test -z "${JAVA_ARGS}"
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza "${JAVA_BIN}" -client org.opends.server.tools.InstallDS -t 2> /dev/null
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza "${JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza echo "ERROR: The detected Java version could not be used. Please set "
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza echo " JAVA_HOME to the root of a Java 5.0 installation."
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza "${JAVA_BIN}" ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza echo "ERROR: The detected Java version could not be used. Please set "
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow echo " JAVA_HOME to the root of a Java 5.0 installation."
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Configure the appropriate CLASSPATH to run uninstall.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane PrazaCLASSPATH=${INSTANCE_ROOT}/lib/quicksetup.jar:${INSTANCE_ROOT}/lib/OpenDS.jar
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Launch the uninstall process.