[SOLVED] Find name of bundle for a karaf restart

All,

Every now and then I have issues with (e.g.) persistence.
If I restart the core persistence it does work again (touch of jdbc.persiste does not help).

I can do this manually in karaf:
by checking the ID and restart this ID:

 69 â Active   â  80 â 2.11.1.v20150805-0538  â EMF XML/XMI Persistence
106 â Active   â  80 â 0.10.0.oh230           â Eclipse SmartHome Core Persistence
131 â Active   â  80 â 0.10.0.oh230           â Eclipse SmartHome Persistence Model
132 â Active   â  80 â 0.10.0.oh230           â Eclipse SmartHome Persistence Model IDE
133 â Active   â  80 â 0.10.0.oh230           â Eclipse SmartHome Persistence Runtime
237 â Active   â  80 â 1.12.0                 â openHAB JDBC SQL Persistence bundle

and:

bundle:restart 106

What I would like to do is to restart tje binding by it’s name:
bundle:restart org.openhab.binding.amazonechocontrol.jar

Shouldn’t this be possible as well?

bundle:restart "Amazon Echo Control Binding" should work.

1 Like

It does work. It’s as simple as that :slight_smile:
Thanks a lot.

1 Like

What if i want to run it from a rule?
executeCommandLine("sudo /usr/bin/ssh -p 8101 -i /home/openhab/karaf_keys/openhab.id_rsa openhab@localhost bundle:restart "Eclipse SmartHome Persistence Runtime""

This does not seem to work as using duoble quotes twice seems to be the issue.

executeCommandLine('sudo /usr/bin/ssh -p 8101 -i /home/openhab/karaf_keys/openhab.id_rsa openhab@localhost bundle:restart "Eclipse SmartHome Persistence Runtime"'

thanks - I will try that.