Menu

Shutdown Knopflerfish from shell

Anonymous
2013-04-19
2013-04-22
  • Anonymous

    Anonymous - 2013-04-19

    Is there a way to shutdown Knopflerfish from a Linux shell? I tried java -jar framework.jar -shutdown 0, but I got the error message no framework to shutdown. For example most web application servers or databases provide something like shutdown.sh.

     
  • Gunnar Ekolin

    Gunnar Ekolin - 2013-04-22

    The problem with something like "java -jar framework.jar -shutdown 0" is to identify which framework to shut down (there may be many framework instances running with different configurations there may even be framework instances running inside each others).

    What you can do from a shell is to telnet into the framework of your choice and call the console command "framework shutdown" this requires that you have the console, console-telnet and frameworkcommands bundles installed and active.

    You can also write your own little bundle that listens on some port and when called fetches the bundle object for the system bundle and calls the stop()-method on it. This way you will have full control of the port number used, the actual protocol and the framework instance that will be stopped. Add a static main-method (sending a shut down message to the bundle) and a Main-Class attribute to the manifest of your shutdown-bundle then you should be able to call it using "java -jar shutdown.jar". Maybe we should add such a bundle to Knopflerfish, what do you think?

     

Log in to post a comment.

MongoDB Logo MongoDB