[jboss-cvs] JBossAS SVN: r94758 - branches/JBPAPP_5_0/server/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 13 04:30:26 EDT 2009


Author: mmalina at redhat.com
Date: 2009-10-13 04:30:26 -0400 (Tue, 13 Oct 2009)
New Revision: 94758

Modified:
   branches/JBPAPP_5_0/server/src/bin/jboss_init_hpux.sh
Log:
JBPAPP-2306 Adding -b ${JBOSS_BIND_ADDR[i] in the HP-UX init script (jboss_init_hpux.sh)

Modified: branches/JBPAPP_5_0/server/src/bin/jboss_init_hpux.sh
===================================================================
--- branches/JBPAPP_5_0/server/src/bin/jboss_init_hpux.sh	2009-10-13 07:38:46 UTC (rev 94757)
+++ branches/JBPAPP_5_0/server/src/bin/jboss_init_hpux.sh	2009-10-13 08:30:26 UTC (rev 94758)
@@ -30,6 +30,8 @@
 #    JBOSS_START[0]=1
 ##   default console logging (you can also just omit the next line)
 #    JBOSS_CONSOLE[0]=""
+##   IP address or hostname to bind to (you can also omit this entry)
+#    JBOSS_BIND_ADDR[0]=localhost
 #############
 #    JBOSS_HOME[1]=/opt/jboss2
 #    JBOSS_USER[1]=jboss2
@@ -37,6 +39,8 @@
 #    JBOSS_START[1]=1
 ##   No Console logging
 #    JBOSS_CONSOLE[1]=/dev/null
+##   IP address or hostname to bind to (you can also omit this entry)
+#    JBOSS_BIND_ADDR[1]=serverhostname
 #
 
 ##################################################################
@@ -70,6 +74,9 @@
 #   Use "/dev/null" if console logging is not desired.
 #   default is /var/opt/jboss/jboss_<user>_<instance>.log
 #
+# JBOSS_BIND_ADDR[i] - IP address or hostname to bind the AS services to
+#   If you don't set anything, localhost is the default.
+#
 # JAVA_HOME should also be defined in the target users environment, such
 #   as is the case when it is exported from ~/.profile.
 #
@@ -174,9 +181,15 @@
     [[ -f ${JBOSS_CONSOLE[i]} ]] && mv ${JBOSS_CONSOLE[i]} ${JBOSS_CONSOLE[i]}.old
 
     # JBoss is not running, start it up
-    CMD_START="${JBOSS_HOME[i]}/bin/run.sh -c ${SERVER_NAME[i]}"
+    if [ "x${JBOSS_BIND_ADDR[i]}" = "x" ]; then
+      CMD_START="${JBOSS_HOME[i]}/bin/run.sh -c ${SERVER_NAME[i]}"
+      START_MESSAGE=""
+    else
+      CMD_START="${JBOSS_HOME[i]}/bin/run.sh -c ${SERVER_NAME[i]} -b ${JBOSS_BIND_ADDR[i]}"
+      START_MESSAGE=" on the ${JBOSS_BIND_ADDR[i]} interface"
+    fi
     nohup su - ${JBOSS_USER[i]} -c "sh $CMD_START" >${JBOSS_CONSOLE[i]} 2>&1 &
-    echo "Starting JBoss AS for user ${JBOSS_USER[i]} at ${JBOSS_HOME[i]} with instance ${SERVER_NAME[i]}."
+    echo "Starting JBoss AS for user ${JBOSS_USER[i]} at ${JBOSS_HOME[i]} with instance ${SERVER_NAME[i]}${START_MESSAGE}."
     
     # wait a few seconds then check if it started ok
     #isJBossRunning ${JBOSS_USER[i]} ${JBOSS_HOME[i]} ${SERVER_NAME[i]} || sleep 2 ||




More information about the jboss-cvs-commits mailing list