Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 94008 invoked from network); 27 Aug 2007 16:52:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2007 16:52:05 -0000 Received: (qmail 90507 invoked by uid 500); 27 Aug 2007 16:52:01 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 90453 invoked by uid 500); 27 Aug 2007 16:52:00 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 90442 invoked by uid 99); 27 Aug 2007 16:52:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2007 09:52:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2007 16:52:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CA6171A983A; Mon, 27 Aug 2007 09:51:41 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r570181 - /directory/apacheds/trunk/server-installers/src/main/installers/apacheds-init Date: Mon, 27 Aug 2007 16:51:41 -0000 To: commits@directory.apache.org From: ccustine@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070827165141.CA6171A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 ;; *)