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