From 04f17d173c9945abfc931d0794fa8d69f821a264 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 29 Aug 2007 22:55:03 +0000
Subject: [PATCH] Update the CreateRCScript tool so that it provides the ability to specify the user that the server should run as (invoked via "su"), and also lets the user specify the JAVA_HOME and JAVA_ARGS settings that should be used.

---
 opendj-sdk/opends/resource/bin/stop-ds |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/resource/bin/stop-ds b/opendj-sdk/opends/resource/bin/stop-ds
index 3a8aab4..02ee4df 100755
--- a/opendj-sdk/opends/resource/bin/stop-ds
+++ b/opendj-sdk/opends/resource/bin/stop-ds
@@ -132,6 +132,7 @@
 EXIT_CODE=1
 MUST_START_USING_SYSTEM_CALL=1
 MUST_STOP_USING_SYSTEM_CALL=1
+QUIET_MODE=1
 
 if test ${EC} -eq 98
 #
@@ -140,13 +141,17 @@
 then
   STOPPED=0
 else
-  if test ${EC} -eq 99
+  if test ${EC} -eq 99 -o ${EC} -eq 105
   #
   # Already stopped and must start locally.
   #
   then
     STOPPED=0
     MUST_START_USING_SYSTEM_CALL=0
+    if test ${EC} -eq 105
+    then
+      QUIET_MODE=0
+    fi
   else
     if test ${EC} -eq 100
     then
@@ -155,13 +160,17 @@
       #
       MUST_STOP_USING_SYSTEM_CALL=0
     else
-      if test ${EC} -eq 101
+      if test ${EC} -eq 101 -o ${EC} -eq 106
       then
         #
         # Restart using system call
         #
         MUST_STOP_USING_SYSTEM_CALL=0
         MUST_START_USING_SYSTEM_CALL=0
+        if test ${EC} -eq 106
+        then
+          QUIET_MODE=0
+        fi
       else
         if test ${EC} -ne 102
         then
@@ -212,9 +221,16 @@
 then
   if test ${STOPPED} -eq 0
   then
-    "${INSTANCE_ROOT}/bin/start-ds"
-    EXIT_CODE=${?}
-    exit ${EXIT_CODE}
+    if test ${QUIET_MODE} -eq 0
+    then
+      "${INSTANCE_ROOT}/bin/start-ds" --quiet
+      EXIT_CODE=${?}
+      exit ${EXIT_CODE}
+    else
+      "${INSTANCE_ROOT}/bin/start-ds"
+      EXIT_CODE=${?}
+      exit ${EXIT_CODE}
+    fi
   fi
 #
 # The user does not want to start the server locally and it is already stopped.

--
Gitblit v1.10.0