stop-ds revision 486
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License, Version 1.0 only
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# (the "License"). You may not use this file except in compliance
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# trunk/opends/resource/legal-notices/OpenDS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# add the following below this CDDL HEADER, with the fields enclosed
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# by brackets "[]" replaced with your own identifying * information:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Portions Copyright 2006 Sun Microsystems, Inc.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This script may be used to request that the Directory Server shut down.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# It operates in two different ways, depending on how it is invoked. If it
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# is invoked without any arguments and a local PID file is available, then it
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# will stop the server by sending a TERM signal to the process, and this
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# script will wait until the server has stopped before exiting. If any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# arguments were provided or there is no local PID file, then it will attempt
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# to stop the server using an LDAP request.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See if JAVA_HOME is set. If not, then see if there is a java executable in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# the path and try to figure it out.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteif test -z "${JAVA_BIN}"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if test -z "${JAVA_HOME}"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# system environment variables for security and compatibility reasons.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
export INSTANCE_ROOT
export CLASSPATH
if test -f "${INSTANCE_ROOT}/logs/server.pid"
EXIT_CODE=${?}
EXIT_CODE=${?}
exit ${EXIT_CODE}