Hello,

I've tricked a lot by writing own bundle that installs features and then stops 
karaf.
The problem is, in new karaf, my bundle got restarted when I trigger feature 
installing, so I get interrupted exception, and the whole process fails.

If I'm going to return to classic solution, adding all features to boot 
features in or.apache.karaf.features.cfg, then I come to starting point, which 
made me trick so much: how can I find out, if karaf has started?
In my build environment, I have no database and other dependent systems, so 
there's no way all bundles will start, but the crucial point is, how can I find 
out that all bundles were installed and I can kill karaf?

In production environment, there will be no maven repository available, so all 
bundles must be installed when running build script.

I've used following script:

#!/bin/bash
export UPDATER_DISABLED=false                                                   
      # tell my bundle to run updates
export UPDATER_SHUTDOWN_WHEN_READY=true                     # tell my bundle to 
kill karaf afterwards
/opt/karaf/bin/karaf server                                                     
                # run karaf, the call will return after my bundle is ready
STATUS=$?                                                                       
                               # save status
rm -rf /home/karaf/.m2/repository                                               
      # cleanup to minimize docker image size
cat data/log/karaf.log # debug output
rm -rf data/log ;
exit $STATUS

Any tips?

Best regards,
Lukasz Lech

Reply via email to