directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r570181 - /directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init
Date Mon, 27 Aug 2007 16:51:41 GMT
Author: ccustine
Date: Mon Aug 27 09:51:40 2007
New Revision: 570181

URL: http://svn.apache.org/viewvc?rev=570181&view=rev
Log:
- DIRSERVER-1018 Added simple check to verify instance is specified on operational commands.
- If no instance is named, then it prints a usage blurb and a list of instances.

Modified:
    directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init

Modified: directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init?rev=570181&r1=570180&r2=570181&view=diff
==============================================================================
--- directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init (original)
+++ directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init Mon Aug 27
09:51:40 2007
@@ -21,15 +21,15 @@
 
 
 # Wrapper
-WRAPPER_CMD="/opt/@app@-@app.version@/bin/apacheds"
-WRAPPER_CONF="/opt/@app@-@app.version@/conf/apacheds.conf"
+WRAPPER_CMD="/opt/@app@-@app.version@/bin/@app@"
+WRAPPER_CONF="/opt/@app@-@app.version@/conf/@app@.conf"
 
 # Priority at which to run the wrapper.  See "man nice" for valid priorities.
 #  nice is only used if a priority is specified.
 PRIORITY=
 
 # Location of the pid file.
-PIDDIR="/var/run/apacheds/$INSTANCE"
+PIDDIR="/var/run/@app@/$INSTANCE"
 
 # If uncommented, causes the Wrapper to be shutdown using an anchor file.
 #  When launched with the 'start' command, it will also ignore all INT and
@@ -525,11 +525,22 @@
     fi
 }
 
+list() {
+  echo "Available instances..."
+  for instance in $INSTANCE_HOME/* ; do
+	echo "	" `basename $instance`;
+  done
+}
+
 # Make sure they entered an instance name
-if [ "x"$2 = "x" ]
+if [[ ( "x"$2 = "x" ) && $1 == "start" || $1 == "stop" || $1 == "status" || $1 ==
"dump" ]]
 then
-    usage
-    exit 1
+	usage
+	echo
+	echo "Please enter an instance name to $1..."
+	echo
+	list
+	exit 1
 fi
 
 case "$1" in
@@ -563,6 +574,9 @@
     'dump')
         checkUser "" $1 $INSTANCE
         dump
+        ;;
+    'list')
+        list
         ;;
 
     *)



Mime
View raw message