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 <[email protected]> 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: [email protected]
Web: http://redhat.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen

Reply via email to