Tried this and it didn't work either..
<exec executable="bash">
<arg line="-c 'ssh ${deploy.username}@${deploy.host}
${activemq.root}/start_activemq.sh' \\&" />
</exec>
mindspin311 wrote:
>
> I'm trying to start activemq remotely with ssh in ant. I can stop it fine.
>
> <sshexec host="${deploy.host}"
> username="${deploy.username}"
> failonerror="false"
> keyfile="${public.key}"
> command="sudo ${activemq.root}/activemq-admin stop" />
>
>
> but when I try to start it, it always hangs up. I can never get it to run
> it in the background on the deploy host, and return from the task on the
> local machine. It seems I've tried every combination of nohup and using &
> or \& to run in the background.
>
> I can get the following to work from the command line.
>
> ssh deploy@media150-03.qa.xxxxxxxxxxxx.net
> /usr/local/activemq/bin/start_activemq.sh \&
>
> but doing this in ant doesn't work.
>
> <target name="startActivemqIndividual">
> <sshexec host="${deploy.host}"
> username="${deploy.username}"
> failonerror="false"
> keyfile="${public.key}"
> command="${activemq.root}/start_activemq.sh \\&" />
>
> Wasn't sure if I had to escape '\' so I tried both. Each of them return
> nothing to the terminal when running and hangup. Activemq however is
> started, but this is pointless as I will have to do this on several
> machines remotely.
>
> I am using a patched version 5.1 of activemq and start_activemq.sh looks
> like this
>
> #!/bin/sh
>
> if [ -z "$JAVA_HOME" ] ; then
> export JAVA_HOME="/usr/local/java"
> fi
>
> if [ -z "$ACTIVEMQ_HOME" ] ; then
> ACTIVEMQ_HOME="/usr/local/activemq"
> fi
>
> $ACTIVEMQ_HOME/bin/activemq &> /dev/null
>
--
View this message in context: http://www.nabble.com/starting-activemq-remotely-tp19372454p19373817.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
|