stop-ds revision 5636
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#!/bin/sh
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater#
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater# CDDL HEADER START
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# The contents of this file are subject to the terms of the
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater# Common Development and Distribution License, Version 1.0 only
7b67cfadd077feb0ec3e6c78385ba0d845a9789bMark Andrews# (the "License"). You may not use this file except in compliance
75b70a68aefaa17ac4e768d5ed85d2f50d471490Automatic Updater# with the License.
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater# You can obtain a copy of the license at
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# trunk/opends/resource/legal-notices/OpenDS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# See the License for the specific language governing permissions
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# When distributing Covered Code, include this CDDL HEADER in each
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater# file and include the License file at
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# add the following below this CDDL HEADER, with the fields enclosed
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater# by brackets "[]" replaced with your own identifying information:
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater#
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright 2006-2009 Sun Microsystems, Inc.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Portions Copyright 2011 ForgeRock AS
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# This script may be used to request that the Directory Server shut down.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# It operates in two different ways, depending on how it is invoked. If it
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# is invoked without any arguments and a local PID file is available, then it
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# will stop the server by sending a TERM signal to the process, and this
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# script will wait until the server has stopped before exiting. If any
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# arguments were provided or there is no local PID file, then it will attempt
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# to stop the server using an LDAP request.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# Capture the current working directory so that we can change to it later.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Then capture the location of this script and the Directory Server instance
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# root so that we can use them to create appropriate paths.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsWORKING_DIR=`pwd`
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updatercd "`dirname "${0}"`"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsSCRIPT_DIR=`pwd`
ca904804e43f663f08eb1ac9d6d617930b9a3cd3Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewscd ..
c0b771f68361b073388b85a689c12cbe502880eeAutomatic UpdaterINSTALL_ROOT=`pwd`
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsexport INSTALL_ROOT
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewscd "${WORKING_DIR}"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# We keep this values to reset the environment before calling start-ds.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsORIGINAL_JAVA_ARGS=${OPENDJ_JAVA_ARGS}
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsORIGINAL_JAVA_HOME=${OPENDJ_JAVA_HOME}
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsORIGINAL_JAVA_BIN=${OPENDJ_JAVA_BIN}
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Specify the script name so that we can use the specified java properties.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonSCRIPT_NAME="stop-ds"
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsexport SCRIPT_NAME
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater# check for presence of lib/_svc-opendj.sh file
723bfc0fc28c486c805de016c4475a35328eb8abAutomatic Updater# If present, we should be on Solaris/OpenSolaris and use SMF to start
55e03fc54708d97917bf26639b987f759bdc1f44Automatic Updater# OpenDJ.
723bfc0fc28c486c805de016c4475a35328eb8abAutomatic Updater# Check --exec. If not present, start OpenDJ from SMF
723bfc0fc28c486c805de016c4475a35328eb8abAutomatic Updaterif test -f "${INSTALL_ROOT}/lib/_svc-opendj.sh"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontthen
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont if [ "$1" = "--exec" ]
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont then
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont shift
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews elif [ "$1" != "-V" -a "$1" != "--version" -a "$1" != "-?" -a \
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater "$1" != "-H" -a "$1" != "--help" ]
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater#These options are not stopping the server, but checking version and help
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews then
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews if [ "$1" = "-R" -o "$1" = "--restart" ]
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater then
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater /usr/sbin/svcadm disable -t svc:/network/ldap/server:opendj
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews RETURN_CODE=$?
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${RETURN_CODE} -ne 0
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater then
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews exit ${RETURN_CODE}
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews fi
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opendj
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater else
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater exec /usr/sbin/svcadm disable -t svc:/network/ldap/server:opendj
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater fi
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater fi
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updaterfi
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Set environment variables
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsSCRIPT_UTIL_CMD=set-full-environment-and-test-java
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsexport SCRIPT_UTIL_CMD
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson. "${INSTALL_ROOT}/lib/_script-util.sh"
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsRETURN_CODE=$?
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonif test ${RETURN_CODE} -ne 0
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsthen
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater exit ${RETURN_CODE}
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updaterfi
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater org.opends.server.tools.StopDS --checkStoppability "${@}"
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic UpdaterEC=${?}
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic UpdaterSTOPPED=1
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic UpdaterEXIT_CODE=1
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterMUST_START_USING_SYSTEM_CALL=1
59528addd704f8d5757b54e540520f74e588a7c7Automatic UpdaterMUST_STOP_USING_SYSTEM_CALL=1
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterQUIET_MODE=1
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updaterif test ${EC} -eq 98
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Already stopped and nothing else to do.
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterthen
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater STOPPED=0
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updaterelse
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${EC} -eq 99 -o ${EC} -eq 105
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # Already stopped and must start locally.
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater STOPPED=0
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater MUST_START_USING_SYSTEM_CALL=0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${EC} -eq 105
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater QUIET_MODE=0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater fi
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater else
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${EC} -eq 100
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater # Stop using system call
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater MUST_STOP_USING_SYSTEM_CALL=0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater else
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater if test ${EC} -eq 101 -o ${EC} -eq 106
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # Restart using system call
bbb069be941f649228760edcc241122933c066d2Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater MUST_STOP_USING_SYSTEM_CALL=0
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater MUST_START_USING_SYSTEM_CALL=0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews if test ${EC} -eq 106
b0d566a2ce0f5a67f537ee7f8233f82f2584cc61Automatic Updater then
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater QUIET_MODE=0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews fi
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater else
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater if test ${EC} -ne 102
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews then
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews exit ${EC}
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater fi
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews fi
c5a53da13bb2126dcbbd5b45ca4904eccafe6621Automatic Updater fi
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews fi
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterfi
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updaterif test ${MUST_STOP_USING_SYSTEM_CALL} -eq 0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterthen
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater if test -f "${INSTANCE_ROOT}/logs/server.pid"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater read PID < "${INSTANCE_ROOT}/logs/server.pid"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington kill ${PID}
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater EXIT_CODE=${?}
7eda3642eea03f1181e41540c7c8791a57759383Automatic Updater if test ${EXIT_CODE} -eq 0
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater then
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater "${OPENDJ_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater --targetFile "${INSTANCE_ROOT}/logs/server.pid" \
7eda3642eea03f1181e41540c7c8791a57759383Automatic Updater --logFile "${INSTANCE_ROOT}/logs/errors"
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater EXIT_CODE=${?}
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson if test ${EXIT_CODE} -eq 0
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater STOPPED=0
5c0fc20d6e59216d9a142409e5fdb498153aeaa5Automatic Updater fi
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater fi
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater else
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "ERROR: Unable to find the server.pid file to determine the process"
f0ecd0e64ffa2a8afef95d81275d46a845f15402Automatic Updater echo " ID of the OpenDJ process to terminate."
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews exit 1
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater fi
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updaterfi
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Delete the pid file if the server is stopped (this can occur if the process
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# has been killed using kill -9).
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsif test ${STOPPED} -eq 0
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonthen
8ae412a86ed138263796195eed82a4716e7effcbMark Andrews if test -f "${INSTANCE_ROOT}/logs/server.pid"
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater then
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews rm "${INSTANCE_ROOT}/logs/server.pid"
3c5dffc581c882235485cf5eaf7cd6a5e07548bfAutomatic Updater fi
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsfi
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Now if the user wants to restart the server, try to restart it if the server
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# is stopped.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterif test ${MUST_START_USING_SYSTEM_CALL} -eq 0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsthen
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews if test ${STOPPED} -eq 0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews then
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Set the original values that the user had on the environment in order to be
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# sure that the start-ds script works with the proper arguments (in particular
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson# if the user specified not to overwrite the environment).
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater OPENDJ_JAVA_ARGS=${ORIGINAL_JAVA_ARGS}
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater OPENDJ_JAVA_HOME=${ORIGINAL_JAVA_HOME}
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater OPENDJ_JAVA_BIN=${ORIGINAL_JAVA_BIN}
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${QUIET_MODE} -eq 0
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews then
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson "${INSTALL_ROOT}/bin/start-ds" --quiet
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews EXIT_CODE=${?}
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater exit ${EXIT_CODE}
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews else
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson "${INSTALL_ROOT}/bin/start-ds"
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews EXIT_CODE=${?}
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews exit ${EXIT_CODE}
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews fi
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews fi
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The user does not want to start the server locally and it is already stopped.
b4cebdb6ccde66a8f3e397a1b90b0cf788519d69Automatic Updater# Just exit.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterelse
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test ${STOPPED} -eq 0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater exit 0
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater fi
bc0a4c01beede169df81a3ee5b614ed9e82339dbAutomatic Updaterfi
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# If we've gotten here, then we should try to stop the server over LDAP.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington org.opends.server.tools.StopDS "${@}"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington