[SOLVED] Uninstall/install a binding through command line

Is it possible to uninstall/install a binding via the command line (i.e. scripting connect to karaf and execute command)?
After ± 20h of running without issues, the Nikobus binding starts getting issues with the refresh/feedback function.

Therefore I’d like to define a cron job that each 12h runs a command/script that quickly uninstalls and reinstalls the Nikobus binding in OH2.
Not the best solution but would be an acceptable workaround.

Maybe. See:

Alternatively you can use addons.cfg. Just have two versions and swap them to uninstall and reinstall. This means though that you have to install ALL of your bindings through addons.cfg though.

cp addons.cfg-nonikobus addons.cfg
sleep(30 seconds)
cp addons.cfg-nikobus addons.cfg

@rlkoshak Thanks a lot for your help!
I had to install sshpass to bypass the ssh authentication limitation and it now works by running a script which does

sshpass -p ‘password’ ssh openhab@ -p 8101 'feature:uninstall '
sleep 15
sshpass -p ‘password’ ssh openhab@ -p 8101 'feature:install ’