uninstall revision 37f9a536593b696e5a3dcec443e1475f22fb5afd
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# CDDL HEADER START
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# The contents of this file are subject to the terms of the
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Common Development and Distribution License, Version 1.0 only
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# (the "License"). You may not use this file except in compliance
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# with the License.
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# You can obtain a copy of the license at
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# trunk/opends/resource/legal-notices/OpenDS.LICENSE
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# See the License for the specific language governing permissions
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# and limitations under the License.
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# When distributing Covered Code, include this CDDL HEADER in each
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# file and include the License file at
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# add the following below this CDDL HEADER, with the fields enclosed
f71f7a61dec7c9089378d14493ad564a1dedf0b5neil_a_wilson# by brackets "[]" replaced with your own identifying information:
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Portions Copyright [yyyy] [name of copyright owner]
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# CDDL HEADER END
f71f7a61dec7c9089378d14493ad564a1dedf0b5neil_a_wilson# Portions Copyright 2006-2007 Sun Microsystems, Inc.
b26e36d8a08a1c775531659c04abc3d4ed504139jvergara# This script may be used to uninstall the server.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# system environment variables for security and compatibility reasons.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Capture the current working directory so that we can change to it later.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Then capture the location of this script and the Directory Server instance
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# root so that we can use them to create appropriate paths.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaracd "${WORKING_DIR}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# See if the environment variables are set. If not, then see if there is a java
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# executable in the path and try to figure it out.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraif test -z "${OPENDS_JAVA_BIN}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara if test -z "${OPENDS_JAVA_HOME}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara if test -f "${INSTANCE_ROOT}/lib/set-java-home"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara . "${INSTANCE_ROOT}/lib/set-java-home"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara if test -z "${JAVA_BIN}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara if test -z "${JAVA_HOME}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara echo "Please set OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Configure the appropriate CLASSPATH.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Determine whether the detected Java environment is acceptable for use.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraif test -z "${JAVA_ARGS}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.InstallDS -t 2> /dev/null
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara "${OPENDS_JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara echo "ERROR: The detected Java version could not be used. Please set "
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara echo " OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara "${OPENDS_JAVA_BIN}" ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara echo "ERROR: The detected Java version could not be used. Please set "
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara echo " OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Launch the uninstall process.
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara"${OPENDS_JAVA_BIN}" -Dorg.opends.server.scriptName=uninstall org.opends.guitools.uninstaller.UninstallLauncher "${@}"
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# return part
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara # Version info was on requested