[jboss-as] Create a startup script when creating a new user instance (jboss-as-cp), RHBZ#827588

Marek Goldmann goldmann at fedoraproject.org
Wed Jul 4 08:56:59 UTC 2012


commit 503dc8cbb3953a25efb3204155d5e68f231c8b29
Author: Marek Goldmann <mgoldman at redhat.com>
Date:   Mon Jun 4 13:10:55 2012 +0200

    Create a startup script when creating a new user instance (jboss-as-cp), RHBZ#827588

 jboss-as-cp.sh |   12 ++++++++++--
 jboss-as.spec  |    1 +
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/jboss-as-cp.sh b/jboss-as-cp.sh
index 9d5c850..64a9eb6 100755
--- a/jboss-as-cp.sh
+++ b/jboss-as-cp.sh
@@ -46,14 +46,22 @@ if [ "x$JBOSS_HOME" = "x" ]; then
    JBOSS_HOME="/usr/share/jboss-as"
 fi
 
-mkdir -p ${LOCATION}/{data,deployments,log,tmp,configuration}
+mkdir -p ${LOCATION}/{bin,data,deployments,log,tmp,configuration}
 
 cp $JBOSS_HOME/docs/examples/configs/$STANDALONE_XML ${LOCATION}/configuration/
 cp $JBOSS_HOME/docs/examples/properties/logging.properties ${LOCATION}/configuration/
 cp $JBOSS_HOME/docs/examples/properties/mgmt-users.properties ${LOCATION}/configuration/
 
+# Create the standalone script
+echo "#!/bin/sh
+
+JBOSS_BASE_DIR=${LOCATION} ${JBOSS_HOME}/bin/standalone.sh -c ${STANDALONE_XML}" > ${LOCATION}/bin/standalone.sh
+
 # Make sure the mgmt-users.properties file has correct permissions!
 chmod 600 ${LOCATION}/configuration/mgmt-users.properties
 
-echo -e "Directory ${LOCATION} is prepared to launch JBoss AS!\n\nYou can now boot your server: JBOSS_BASE_DIR=${LOCATION} ${JBOSS_HOME}/bin/standalone.sh -c ${STANDALONE_XML}"
+# Set the executable permissions correctly
+chmod 755 ${LOCATION}/bin/standalone.sh
+
+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 2dbea64..92e29f5 100644
--- a/jboss-as.spec
+++ b/jboss-as.spec
@@ -729,6 +729,7 @@ rm -rf %{homedir}/modules/org/hornetq/main/lib/linux-${arch}/*
 %changelog
 * 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
 
 * 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