Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1862#discussion_r173290483
--- Diff:
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile
---
@@ -21,14 +21,20 @@ ARTEMIS_INSTANCE='${artemis.instance}'
# The logging config will need an URI
# this will be encoded in case you use spaces or special characters
# on your directory structure
-ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
-# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can
be referenced in broker.xml
-#ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617
-Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614
-Dactivemq.remoting.hornetq.port=5446"
+if [ -z "$ARTEMIS_INSTANCE_URI" ]; then
+ ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
+fi
+# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can
be referenced in broker.xml
+if [ -z "$ARTEMIS_CLUSTER_PROPS" ]; then
+ #ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617
-Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614
-Dactivemq.remoting.hornetq.port=5446"
--- End diff --
I would be ok with this on ARTEMIS_HOME.. ARTEMIS_INSTANCE is a bit
dangerous IMO.
Say you went to cd /artemis-servers/server1
and by accident previously you set ARTEMIS-INSTANCE =
/artemis-server/myOtherServer
You wouldn't be able to figure out easily... I think it's a bit dangerous...
the best way we can do about this is like what we do now.. we figure out
ARTEMIS-INSTANCE by the location of the executable's. if you do
/my-other-server/bin/artemis start
then you will know you're starting the right server.
---