[jboss-cvs] JBossAS SVN: r90647 - branches/JBPAPP_5_0/main/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 26 12:59:45 EDT 2009


Author: smarlow at redhat.com
Date: 2009-06-26 12:59:45 -0400 (Fri, 26 Jun 2009)
New Revision: 90647

Modified:
   branches/JBPAPP_5_0/main/src/bin/run.sh
Log:
JBPAPP-2052 Production profile for EAP 5

Modified: branches/JBPAPP_5_0/main/src/bin/run.sh
===================================================================
--- branches/JBPAPP_5_0/main/src/bin/run.sh	2009-06-26 16:57:35 UTC (rev 90646)
+++ branches/JBPAPP_5_0/main/src/bin/run.sh	2009-06-26 16:59:45 UTC (rev 90647)
@@ -11,6 +11,36 @@
 PROGNAME=`basename $0`
 GREP="grep"
 
+# Set conf if specified, else set to production
+JBOSSCONF="production"
+CONF_SPECIFIED=false 
+
+arg_count=1
+eval SWITCH=\${$arg_count}
+while [ ! -z "$SWITCH" ]
+do
+
+        if [ "$SWITCH" = "-c" ]; then
+            eval JBOSSCONF=\$`expr $arg_count + 1`
+            CONF_SPECIFIED=true
+            break
+        fi
+
+        echo "$SWITCH" | grep "^\-\-configuration=" > /dev/null
+        if [ $? -eq 0 ]; then
+            JBOSSCONF=`echo $SWITCH|sed 's/\-\-configuration=//'`
+            break
+        fi 
+
+        arg_count=`expr $arg_count + 1`
+        eval SWITCH=\${$arg_count}
+done
+
+if [ x${CONF_SPECIFIED} = "xfalse" ]
+then
+   set -- "-c" ${JBOSSCONF} $@
+fi 
+
 # Use the maximum available, or set MAX_FD != -1 to use that
 MAX_FD="maximum"
 
@@ -49,7 +79,12 @@
 
 # Read an optional running configuration file
 if [ "x$RUN_CONF" = "x" ]; then
-    RUN_CONF="$DIRNAME/run.conf"
+
+    if [ ! -z "$JBOSSCONF" ] && [ -f "$DIRNAME/../server/$JBOSSCONF/run.conf" ]; then
+        RUN_CONF="$DIRNAME/../server/$JBOSSCONF/run.conf"
+    else
+        RUN_CONF="$DIRNAME/run.conf"
+    fi
 fi
 if [ -r "$RUN_CONF" ]; then
     . "$RUN_CONF"




More information about the jboss-cvs-commits mailing list