From 9f4a666bf86f5d45fed245c6778ddd09275f824f Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 03 Sep 2013 15:33:15 +0000
Subject: [PATCH] CR-2254 Fix for OPENDJ-1119: Document service capabilities in .deb, .rpm

---
 opendj-sdk/opends/src/main/docbkx/install-guide/chap-install-cli.xml  |   42 +++++++++++++-------
 opendj-sdk/opends/src/main/docbkx/admin-guide/chap-server-process.xml |   45 ++++++++++++++++++++++
 opendj-sdk/opends/src/main/docbkx/release-notes/chap-whats-new.xml    |   11 +++++
 3 files changed, 82 insertions(+), 16 deletions(-)

diff --git a/opendj-sdk/opends/src/main/docbkx/admin-guide/chap-server-process.xml b/opendj-sdk/opends/src/main/docbkx/admin-guide/chap-server-process.xml
index 0e6d291..8cd31a8 100644
--- a/opendj-sdk/opends/src/main/docbkx/admin-guide/chap-server-process.xml
+++ b/opendj-sdk/opends/src/main/docbkx/admin-guide/chap-server-process.xml
@@ -53,6 +53,20 @@
     <para>Alternatively, you can specify the --no-detach option to start
     the server in the foreground.</para>
    </listitem>
+
+   <listitem>
+    <para>(Linux) If OpenDJ directory server was installed from a .deb or .rpm
+    package, then service management scripts were created at setup time.</para>
+
+    <para>Use the <command>service opendj start</command> command.</para>
+
+    <screen>centos# service opendj start
+Starting opendj (via systemctl):                           [  OK  ]</screen>
+
+    <screen>ubuntu$ sudo service opendj start
+$Starting opendj: > SUCCESS.</screen>
+   </listitem>
+
    <listitem>
     <para>(UNIX) Create an RC script, and then use the script to start
     the server.</para>
@@ -105,6 +119,20 @@
     <para>Use the <command>stop-ds</command> command.</para>
     <screen>$ stop-ds</screen>
    </listitem>
+
+   <listitem>
+    <para>(Linux) If OpenDJ directory server was installed from a .deb or .rpm
+    package, then service management scripts were created at setup time.</para>
+
+    <para>Use the <command>service opendj start</command> command.</para>
+
+    <screen>centos# service opendj stop
+Stopping opendj (via systemctl):                           [  OK  ]</screen>
+
+    <screen>ubuntu$ sudo service opendj stop
+$Stopping opendj: ... > SUCCESS.</screen>
+   </listitem>
+
    <listitem>
     <para>(UNIX) Create an RC script, and then use the script to stop
     the server.</para>
@@ -131,6 +159,22 @@
     <para>Use the <command>stop-ds</command> command.</para>
     <screen>$ stop-ds --restart</screen>
    </listitem>
+
+   <listitem>
+    <para>(Linux) If OpenDJ directory server was installed from a .deb or .rpm
+    package, then service management scripts were created at setup time.</para>
+
+    <para>Use the <command>service opendj start</command> command.</para>
+
+    <screen>centos# service opendj restart
+Restarting opendj (via systemctl):                         [  OK  ]</screen>
+
+    <screen>ubuntu$ sudo service opendj restart
+$Stopping opendj: ... > SUCCESS.
+
+$Starting opendj: > SUCCESS.</screen>
+   </listitem>
+
    <listitem>
     <para>(UNIX) Create an RC script, and then use the script to stop
     the server.</para>
@@ -146,7 +190,6 @@
    </listitem>
   </itemizedlist>
  </section>
-  
  <section xml:id="crash-recovery">
   <title>Server Recovery</title>
   <indexterm>
diff --git a/opendj-sdk/opends/src/main/docbkx/install-guide/chap-install-cli.xml b/opendj-sdk/opends/src/main/docbkx/install-guide/chap-install-cli.xml
index 36df731..e4d14a1 100644
--- a/opendj-sdk/opends/src/main/docbkx/install-guide/chap-install-cli.xml
+++ b/opendj-sdk/opends/src/main/docbkx/install-guide/chap-install-cli.xml
@@ -446,10 +446,22 @@
 Unpacking opendj (from opendj_<?eval ${docTargetVersion}?>-1_all.deb) ...
 
 Setting up opendj (<?eval ${docTargetVersion}?>) ...
+ Adding system startup for /etc/init.d/opendj ...
+   /etc/rc0.d/K20opendj -> ../init.d/opendj
+   /etc/rc1.d/K20opendj -> ../init.d/opendj
+   /etc/rc6.d/K20opendj -> ../init.d/opendj
+   /etc/rc2.d/S20opendj -> ../init.d/opendj
+   /etc/rc3.d/S20opendj -> ../init.d/opendj
+   /etc/rc4.d/S20opendj -> ../init.d/opendj
+   /etc/rc5.d/S20opendj -> ../init.d/opendj
+
+Processing triggers for ureadahead ...
+ureadahead will be reprofiled on next reboot
 $</screen>
 
    <para>The .deb installs OpenDJ directory server in the directory
-   <filename>/opt/opendj</filename>.</para>
+   <filename>/opt/opendj</filename>, generates service management scripts, and
+   adds documentation files under <filename>/usr/share/doc/opendj</filename>.</para>
 
    <para>The files are owned by root by default, making it easier to have OpenDJ
    listen on ports 389 and 636.</para>
@@ -468,7 +480,9 @@
   <step performance="optional">
    <para>Check OpenDJ directory server status.</para>
 
-   <screen>$ sudo /opt/opendj/bin/status
+   <screen>$ service opendj status
+$opendj status: > Running.
+$ sudo /opt/opendj/bin/status
 
 
 >>>> Specify OpenDJ LDAP connection parameters
@@ -505,12 +519,6 @@
 Entries:     2002
 Replication: </screen>
   </step>
-
-  <step performance="optional">
-   <para>If you want to run OpenDJ when the system starts, see <link
-   xlink:show="new" xlink:role="http://docbook.org/xlink/role/olink"
-   xlink:href="admin-guide#create-rc-script-1">create-rc-script</link>.</para>
-  </step>
  </procedure>
 
  <procedure xml:id="install-rpm">
@@ -549,7 +557,9 @@
 #</screen>
 
    <para>The .rpm installs OpenDJ directory server in the directory
-   <filename>/opt/opendj</filename>.</para>
+   <filename>/opt/opendj</filename>, generates service management scripts, and
+   adds documentation files under <filename>/usr/share/doc/opendj-<replaceable
+   >version</replaceable></filename>.</para>
 
    <para>The files are owned by root by default, making it easier to have OpenDJ
    listen on ports 389 and 636.</para>
@@ -568,7 +578,9 @@
   <step performance="optional">
    <para>Check OpenDJ directory server status.</para>
 
-   <screen># /opt/opendj/bin/status
+   <screen># service opendj status
+opendj status: > Running.
+# /opt/opendj/bin/status
 
 
 >>>> Specify OpenDJ LDAP connection parameters
@@ -604,12 +616,12 @@
 Backend ID:  userRoot
 Entries:     2002
 Replication: </screen>
-  </step>
 
-  <step performance="optional">
-   <para>If you want to run OpenDJ when the system starts, see <link
-   xlink:show="new" xlink:role="http://docbook.org/xlink/role/olink"
-   xlink:href="admin-guide#create-rc-script-1">create-rc-script</link>.</para>
+   <para>By default OpenDJ starts in run levels 2, 3, 4, and 5.</para>
+
+   <screen># chkconfig --list | grep opendj
+...
+opendj         0:off    1:off    2:on    3:on    4:on    5:on    6:off</screen>
   </step>
  </procedure>
 
diff --git a/opendj-sdk/opends/src/main/docbkx/release-notes/chap-whats-new.xml b/opendj-sdk/opends/src/main/docbkx/release-notes/chap-whats-new.xml
index 6a3a627..4564fd2 100644
--- a/opendj-sdk/opends/src/main/docbkx/release-notes/chap-whats-new.xml
+++ b/opendj-sdk/opends/src/main/docbkx/release-notes/chap-whats-new.xml
@@ -41,6 +41,17 @@
     </listitem>
 
     <listitem>
+     <para>Debian and RPM packages now provide service management scripts so
+     that you can manage the server with the <command>service</command>, and
+     include documentation files under <filename>/usr/share/doc/opendj*</filename>
+     (<link xlink:show="new"
+     xlink:href="https://bugster.forgerock.org/jira/browse/OPENDJ-1068"
+     >OPENDJ-1068</link>, <link xlink:show="new"
+     xlink:href="https://bugster.forgerock.org/jira/browse/OPENDJ-1114"
+     >OPENDJ-1114</link>).</para>
+    </listitem>
+
+    <listitem>
      <para>OpenDJ REST LDAP gateway now supports SSL and StartTLS connections
      to directory servers (<link xlink:show="new"
      xlink:href="https://bugster.forgerock.org/jira/browse/OPENDJ-1033"

--
Gitblit v1.10.0