You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jay <my...@gmail.com> on 2013/06/21 13:20:39 UTC

Script to run the servicemix and install the features automatically

Hi - My requirement is to run the smx and install the bunldes/features using
some script (automation)..

I wrote a bash script to run the servicemix and install the features. but it
is not working.

#!/bin/bash

sh /apache-servicemix-4.5.x/bin/servicemix &

./client -u smx -p smx features:addUrl mvn:com.xyz/myAPP/0.0.5/xml/features;
features:install myAPP

#ssh -p 8101 -l smx localhost -P smx features:addUrl
mvn:com.xyz/myAPP/0.0.5/xml/features;features:install myAPP


Error: Failed to get the session.
After a few seconds Karaf is getting exited automatically.. also i wanted to
run the service in background that was the reason i gave symbol & - any
views on the issue?


NB: if i run the service mix normally and run the features command it works.





--
View this message in context: http://servicemix.396122.n5.nabble.com/Script-to-run-the-servicemix-and-install-the-features-automatically-tp5717061.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Script to run the servicemix and install the features automatically

Posted by jay <my...@gmail.com>.
Cheers Mate..  it works :)



--
View this message in context: http://servicemix.396122.n5.nabble.com/Script-to-run-the-servicemix-and-install-the-features-automatically-tp5717061p5717064.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Script to run the servicemix and install the features automatically

Posted by Jon Anstey <ja...@gmail.com>.
While not very elegant, this will work:

# start in background
./bin/start

# wait till SSH daemon is up
sleep 5

# run your commands
./bin/client -u smx -p smx "your command here"



On Fri, Jun 21, 2013 at 8:50 AM, jay <my...@gmail.com> wrote:

> Hi - My requirement is to run the smx and install the bunldes/features
> using
> some script (automation)..
>
> I wrote a bash script to run the servicemix and install the features. but
> it
> is not working.
>
> #!/bin/bash
>
> sh /apache-servicemix-4.5.x/bin/servicemix &
>
> ./client -u smx -p smx features:addUrl
> mvn:com.xyz/myAPP/0.0.5/xml/features;
> features:install myAPP
>
> #ssh -p 8101 -l smx localhost -P smx features:addUrl
> mvn:com.xyz/myAPP/0.0.5/xml/features;features:install myAPP
>
>
> Error: Failed to get the session.
> After a few seconds Karaf is getting exited automatically.. also i wanted
> to
> run the service in background that was the reason i gave symbol & - any
> views on the issue?
>
>
> NB: if i run the service mix normally and run the features command it
> works.
>
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Script-to-run-the-servicemix-and-install-the-features-automatically-tp5717061.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Jon
---------------
Red Hat, Inc.
Email: janstey@redhat.com
Web: http://redhat.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen