Hi,

You can install a bundle where add a shutdown hook and do whatever you want, 
code like

Thread hook = new Thread() {
            @Override
            public void run() {
                //do what you want
            }
        };
        Runtime.getRuntime().addShutdownHook(hook); 
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-11-1, at 上午10:22, Tom Leung wrote:

> When type in the following Karaf command:
>  
> > shutdown
>  
> or stop the Karaf windows service on Windows Platform.
>  
> Is there a way to automatically fire a Karaf shell script before shutting 
> down Karaf?
>  
>  
> Best Rgds,
>  
> Tom
>  
>  
>  
>  

Reply via email to