stop-ds revision 9da44d3de0a7180285a77b7e8d2426a72aca249e
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#!/bin/sh
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Common Development and Distribution License, Version 1.0 only
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# (the "License"). You may not use this file except in compliance
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# trunk/opends/resource/legal-notices/OpenDS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews# file and include the License file at
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# add the following below this CDDL HEADER, with the fields enclosed
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# by brackets "[]" replaced with your own identifying information:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Portions Copyright [yyyy] [name of copyright owner]
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Portions Copyright 2006-2007 Sun Microsystems, Inc.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This script may be used to request that the Directory Server shut down.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# It operates in two different ways, depending on how it is invoked. If it
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# is invoked without any arguments and a local PID file is available, then it
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# will stop the server by sending a TERM signal to the process, and this
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# script will wait until the server has stopped before exiting. If any
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# arguments were provided or there is no local PID file, then it will attempt
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to stop the server using an LDAP request.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Capture the current working directory so that we can change to it later.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Then capture the location of this script and the Directory Server instance
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# root so that we can use them to create appropriate paths.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsWORKING_DIR=`pwd`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewscd `dirname "${0}"`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSCRIPT_DIR=`pwd`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewscd ..
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINSTANCE_ROOT=`pwd`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport INSTANCE_ROOT
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrewscd "${WORKING_DIR}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See if JAVA_HOME is set. If not, then see if there is a java executable in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the path and try to figure it out.
b0e8629055a766d4555a005a283c2889a5974945Mark Andrewsif test -z "${JAVA_BIN}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test -z "${JAVA_HOME}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test -f "${INSTANCE_ROOT}/lib/set-java-home"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews . "${INSTANCE_ROOT}/lib/set-java-home"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews JAVA_BIN="${JAVA_HOME}/bin/java"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews export JAVA_BIN
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews JAVA_BIN=`which java 2> /dev/null`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${?} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews export JAVA_BIN
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit 1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews JAVA_BIN="${JAVA_HOME}/bin/java"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews export JAVA_BIN
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# system environment variables for security and compatibility reasons.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPATH=/bin:/usr/bin
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_LIBRARY_PATH=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_LIBRARY_PATH_32=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_LIBRARY_PATH_64=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_PRELOAD=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_PRELOAD_32=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLD_PRELOAD_64=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews LD_PRELOAD LD_PRELOAD_32 LD_PRELOAD_34
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews# Configure the appropriate CLASSPATH.
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark AndrewsCLASSPATH=${INSTANCE_ROOT}/classes
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrewsfor JAR in ${INSTANCE_ROOT}/lib/*.jar
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrewsdo
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews CLASSPATH=${CLASSPATH}:${JAR}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdone
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport CLASSPATH
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Specify the script name so that it may be provided in command-line usage.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=stop-ds"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport SCRIPT_NAME_ARG
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Test that the provided JDK is 1.5 compatible.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsif test -z "${JAVA_ARGS}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews "${JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${?} -ne 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo "ERROR: The detected Java version could not be used. Please set "
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo " JAVA_HOME to the root of a Java 5.0 installation."
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit 1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewselse
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews "${JAVA_BIN}" ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${?} -ne 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo "ERROR: The detected Java version could not be used with the specified"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo "Java arguments. Please set JAVA_HOME to the root of a Java 5.0 installation."
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit 1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews"${JAVA_BIN}" ${JAVA_ARGS} ${SCRIPT_NAME_ARG} \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews org.opends.server.tools.StopDS --checkStoppability "${@}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEC=${?}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSTOPPED=1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXIT_CODE=1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMUST_START_USING_SYSTEM_CALL=1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMUST_STOP_USING_SYSTEM_CALL=1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsif test ${EC} -eq 98
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Already stopped and nothing else to do.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews STOPPED=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewselse
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EC} -eq 99
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # Already stopped and must start locally.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews STOPPED=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MUST_START_USING_SYSTEM_CALL=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EC} -eq 100
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # Stop using system call
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MUST_STOP_USING_SYSTEM_CALL=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EC} -eq 101
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # Restart using system call
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews #
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MUST_STOP_USING_SYSTEM_CALL=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MUST_START_USING_SYSTEM_CALL=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews else
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EC} -ne 102
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit ${EC}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsif test ${MUST_STOP_USING_SYSTEM_CALL} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test -f "${INSTANCE_ROOT}/logs/server.pid"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews kill `cat "${INSTANCE_ROOT}/logs/server.pid"`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews EXIT_CODE=${?}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EXIT_CODE} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews "${JAVA_BIN}" -Xms8M -Xmx8M org.opends.server.tools.WaitForFileDelete \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --targetFile "${INSTANCE_ROOT}/logs/server.pid" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --logFile "${INSTANCE_ROOT}/logs/errors"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews EXIT_CODE=${?}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${EXIT_CODE} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews STOPPED=0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Delete the pid file if the server is stopped (this can occur if the process
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# has been killed using kill -9).
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsif test ${STOPPED} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test -f "${INSTANCE_ROOT}/logs/server.pid"
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews then
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews rm "${INSTANCE_ROOT}/logs/server.pid"
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews fi
8c9957e63274e6ea44d182703116307b1a65dabbMark Andrewsfi
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Now if the user wants to restart the server, try to restart it if the server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# is stopped.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsif test ${MUST_START_USING_SYSTEM_CALL} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsthen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${STOPPED} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews "${INSTANCE_ROOT}/bin/start-ds"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews EXIT_CODE=${?}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit ${EXIT_CODE}
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The user does not want to start the server locally and it is already stopped.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Just exit.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewselse
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if test ${STOPPED} -eq 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews then
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews exit 0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews fi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsfi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If we've gotten here, then we should try to stop the server over LDAP.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews"${JAVA_BIN}" ${JAVA_ARGS} ${SCRIPT_NAME_ARG} \
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews org.opends.server.tools.StopDS "${@}"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews