Am 06.07.2015 um 18:13 schrieb Dejan Bosanac: > bin/activemq export --file=archive.tgz >> What is the usecase for this feature? >> Is there als a "import" >> > There’s an import in Apollo broker and I assume we’ll create it for Artemis > to ease the migration. > Ah great.
> I’m not sure about this. It works here (just checked). Please raise a Jira > for it. > See https://issues.apache.org/jira/browse/AMQ-5902 Can somebody create a component named "Unix-Script" in the ActiveMQ Jira? (Probably with my id "scoopex" as component maintainer) > >>> Create command is often used and it can be used like >>> >>> bin/activemq create test-brokeres >> Ah ok. What are the known usecases? >> >> The activemq init script provides also the functionality to create and >> run multiple instances on the same machine. >> This mechanism also provides a independent script environment >> configuration. >> > It allows you to use different broker instances using the same binaries. So > ACTIVEMQ_HOME is the same, but ACTIVEMQ_BASE is different. You can have one > installation of the broker and then run multiple instances with different > configuration. Try it out, it copies bin/ and conf/ directories and you > don’t need to change any environment variables or use init.d. > > >> >> https://cwiki.apache.org/confluence/display/ACTIVEMQ/Unix+Shell+Script#UnixShellScript-Runningmultipleinstances >>> BTW. While you at it, you might wanna take a peak at this PR >>> https://github.com/apache/activemq/pull/109 and maybe close your >> original >>> PR for improvements. >>> >> The described problem happens because the file "env" has exec >> permissions and the activemq bin folder is part of the PATH variable? >> The "env" file does not need exec permissions, but this might be a >> typical problem. >> > If changing permissions on env would solve it, I think it should be the > best approach (instead of renaming or moving it). That will solve the problem. I fixed that at src/main/descriptors/unix-bin.xml. See commit : $ git show 167c510 commit 167c510331692bfa2648724d16330d49ec8dd0ae Author: Marc Schoechlin <[email protected]> Date: Sat Jul 25 17:22:10 2015 +0200 changed permissions of "env" file The previous permission of the <activemq-install-dir>/bin/env file (755) caused some problems on systems where the <activemq-install-dir>/bin/ directory is part of the PATH variable. The executable "env" is also available of all common unix platforms. If <activemq-install-dir>/bin/ has precedence in the PATH environment variable this causes lots of unexpected problems. In future it would be a good idea to relocate the file to the <activemq-install-dir>/conf directory. diff --git a/assembly/src/main/descriptors/unix-bin.xml b/assembly/src/main/descriptors/unix-bin.xml index a1e4d38..592d75e 100644 --- a/assembly/src/main/descriptors/unix-bin.xml +++ b/assembly/src/main/descriptors/unix-bin.xml @@ -96,7 +96,6 @@ <outputDirectory>/</outputDirectory> <includes> <include>bin/activemq</include> - <include>bin/env</include> <include>bin/diag</include> <include>bin/activemq-admin</include> <include>bin/macosx/activemq</include> @@ -107,6 +106,19 @@ <lineEnding>unix</lineEnding> </fileSet> + <!-- Copy over the unix-script configuration file that need unix line endings and also chmod to 644 --> + <fileSet> + <directory>src/release</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>bin/env</include> + </includes> + <directoryMode>0755</directoryMode> + <fileMode>0644</fileMode> + <lineEnding>unix</lineEnding> + </fileSet> + + <!-- Copy over example scripts that need unix line endings and also chmod to 755 --> <fileSet> <directory>src/release</directory> > >> Probably we should move the "env" script to conf/env (i hate changing >> file locations, because creates problems for the users). >> We should also rename the script "diag" to "activemq-diag" or we should >> add this functionality to the init script. >> I think the second possibility might be better - because this also >> allows access to the script configuration. >> > I’d leave it as a separate script as init scripts is complex, so no need to > add more to it. If we just change permissions on env, we can leave diag as > is. I renamed the utility to a non problematic name. Due to the fact that this script is only needed for debug purposes this should not be problematic. From my point of view i recommend to remove that file. commit eb8723c1e9f8de350cc8974c0a9fcb1b68caf26e Author: Marc Schoechlin <[email protected]> Date: Sat Jul 25 17:43:07 2015 +0200 renamed bin/diag to bin/activemq-diag This prevents ambiguities in the unix PATH environment variable. > >> I also want to drop the "activemq-admin" script, because the >> functionality of this script is redundant to the "activemq" script. >> What do you think? >> >> > I agree, it duplicates functionality and is not maintained properly. > Its completely feature redundant. Removed it by the following commit. Author: Marc Schoechlin <[email protected]> Date: Sat Jul 25 17:40:28 2015 +0200 removed activemq-admin This script provides redundant functionality to "bin/activemq" and its broken because it uses the wrong environment configuration. Regards Marc -- GPG encryption available: 0x670DCBEC/pool.sks-keyservers.net
