<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="stop-ds-1" xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>stop-ds</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>stop-ds</application></refname>
<refpurpose>stop OpenDJ directory server</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>stop-ds</command>
<arg>-R</arg>
<arg>-r <replaceable class="parameter">stopReason</replaceable></arg>
<arg>-Y <replaceable class="parameter">authzID</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-task"]/*[@name="sc-time"])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*[not(@name="sc-contimeout")])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-misc"]/*[@name="sc-quiet"])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to request that the directory server stop running or
perform a restart.
</para>
<para>
When run without connection options, <command>stop-ds</command> sends an OS
signal to the OpenDJ process to stop the server. When run with connection
options, the <command>stop-ds</command> connects to the OpenDJ administration
port and creates a shutdown task to stop the server.
</para>
<para os="solaris">
When the related SMF service for the intended OpenDJ instance is enabled, one
should <emphasis>not</emphasis> use this command directly but rather the
<citerefentry>
<refentrytitle>svcadm</refentrytitle><manvolnum>1M</manvolnum>
</citerefentry> command within the OpenDJ running zone to stop or restart it.
Otherwise SMF will detect, that all processes in the corresponding contract died
and thus it will automatically try to start the service again.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>The following options are supported.</para>
<variablelist>
<varlistentry>
<term><option>-R, --restart</option></term>
<listitem>
<para>
Attempt to automatically restart the server once it has stopped.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r, --stopReason</option> <replaceable
class="parameter">stopReason</replaceable></term>
<listitem>
<para>
Reason the server is being stopped or restarted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-Y, --proxyAs</option> <replaceable
class="parameter">authzID</replaceable></term>
<listitem>
<para>
Use the proxied authorization control with the given authorization ID.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-task"]/*[@name="lc-stop"])'/>
</variablelist>
<refsection>
<title>LDAP Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*[not(@name="lc-contimeout")])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-misc"]/*[@name="lc-quiet"])'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample os="solaris">
<para>
The following example stops the default OpenDJ directory server instance via SMF.
</para>
<literallayout><prompt
>$ </prompt><command>svcadm disable opendj@VERS@:default</command></literallayout>
</informalexample>
<informalexample>
<para>
The following example restarts the default OpenDJ directory server manually.
</para>
<literallayout><prompt
>$ </prompt><command>stop-ds --restart</command></literallayout>
<screen>
Stopping Server...
...The Directory Server has started successfully
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<refsection>
<title>See Also</title>
<para>
<citerefentry>
<refentrytitle>start-ds</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry>
<refentrytitle>dsjavaproperties</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry>
<refentrytitle>opendj</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v5"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcadm</refentrytitle>
<manvolnum>1M</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcs</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcprop</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svccfg</refentrytitle>
<manvolnum>1M</manvolnum>
</citerefentry>.
</para>
</refsection>
</refentry>