[jboss-as] The user instance create script (jboss-as-cp) should allow a port offset to be specified, RHBZ#82758
Marek Goldmann
goldmann at fedoraproject.org
Wed Jul 4 08:57:04 UTC 2012
commit 29de841838ec3043d686dfbe4b71ad7e84e4d742
Author: Marek Goldmann <mgoldman at redhat.com>
Date: Mon Jun 4 14:33:43 2012 +0200
The user instance create script (jboss-as-cp) should allow a port offset to be specified, RHBZ#827589
jboss-as-cp.sh | 11 ++++++++++-
jboss-as.spec | 1 +
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/jboss-as-cp.sh b/jboss-as-cp.sh
index 64a9eb6..87fb872 100755
--- a/jboss-as-cp.sh
+++ b/jboss-as-cp.sh
@@ -11,12 +11,13 @@ OPTIONS:
-h Show this message
-c JBoss AS configuration xml file (see \$JBOSS_HOME/docs/examples/configs/), default: standalone-web.xml
-l Location where the directory structure should be created (required)
+ -p Port offset, see https://community.jboss.org/docs/DOC-16705
EOF
}
STANDALONE_XML="standalone-web.xml"
-while getopts “hc:l:” OPTION
+while getopts “hc:l:p:” OPTION
do
case $OPTION in
h)
@@ -29,6 +30,9 @@ do
l)
LOCATION=$OPTARG
;;
+ p)
+ PORT_OFFSET=$OPTARG
+ ;;
?)
usage
exit
@@ -63,5 +67,10 @@ chmod 600 ${LOCATION}/configuration/mgmt-users.properties
# Set the executable permissions correctly
chmod 755 ${LOCATION}/bin/standalone.sh
+# Set the port offset (if specified)
+if [ "x$PORT_OFFSET" != "x" ]; then
+ sed -i s/'\(socket-binding-group name="standard-sockets" default-interface="public"\).*'/"\1 port-offset=\"${PORT_OFFSET}\">"/ ${LOCATION}/configuration/${STANDALONE_XML}
+fi
+
echo -e "Directory ${LOCATION} is prepared to launch JBoss AS!\n\nYou can now boot your instance: ${LOCATION}/bin/standalone.sh"
diff --git a/jboss-as.spec b/jboss-as.spec
index 92e29f5..96b2d68 100644
--- a/jboss-as.spec
+++ b/jboss-as.spec
@@ -730,6 +730,7 @@ rm -rf %{homedir}/modules/org/hornetq/main/lib/linux-${arch}/*
* Mon Jun 04 2012 Marek Goldmann <mgoldman at redhat.com> 7.1.1-4
- jboss-as-cp script is missing argument placeholder for c optarg, RHBZ#827571
- Create a startup script when creating a new user instance (jboss-as-cp), RHBZ#827588
+- The user instance create script (jboss-as-cp) should allow a port offset to be specified, RHBZ#827589
* Fri May 11 2012 Marek Goldmann <mgoldman at redhat.com> 7.1.1-3
- Changed the way we apply patches at build time
More information about the scm-commits
mailing list