stop-ds revision 486
6499N/A# The contents of this file are subject to the terms of the 6499N/A# Common Development and Distribution License, Version 1.0 only 6499N/A# (the "License"). You may not use this file except in compliance 6499N/A# You can obtain a copy of the license at 6499N/A# See the License for the specific language governing permissions 6499N/A# and limitations under the License. 6499N/A# When distributing Covered Code, include this CDDL HEADER in each 6499N/A# file and include the License file at 6499N/A# add the following below this CDDL HEADER, with the fields enclosed 6499N/A# by brackets "[]" replaced with your own identifying * information: 6499N/A# Portions Copyright [yyyy] [name of copyright owner] 6499N/A# Portions Copyright 2006 Sun Microsystems, Inc. 6499N/A# This script may be used to request that the Directory Server shut down. 6499N/A# It operates in two different ways, depending on how it is invoked. If it 6499N/A# is invoked without any arguments and a local PID file is available, then it 6499N/A# will stop the server by sending a TERM signal to the process, and this 6499N/A# script will wait until the server has stopped before exiting. If any 6499N/A# arguments were provided or there is no local PID file, then it will attempt 6499N/A# to stop the server using an LDAP request. 6499N/A# See if JAVA_HOME is set. If not, then see if there is a java executable in 6499N/A# the path and try to figure it out. 6499N/A echo "Please set JAVA_HOME to the root of a Java 5.0 installation." 6499N/A# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important 6499N/A# system environment variables for security and compatibility reasons. # Capture the current working directory so that we can change to it later. # Then capture the location of this script and the Directory Server instance # root so that we can use them to create appropriate paths. # Configure the appropriate CLASSPATH. # See if any arguments were provided and if a local PID file exists. If there # were no arguments and there is a PID file, then try to stop the server with if test "${EXIT_CODE}" -
eq 0 # If we've gotten here, then we should try to stop the server over LDAP.