Jump to content

Restart Service from the command line


kegham
 Share

Recommended Posts

Hello!

I would like to know if I can restart the Emby plugin from the command line. I'm doing s script to restart the service once the connection with the server is reestablished, since the plugin can't reconnect to the server unless I restart the app.

Thanks!

 

Link to comment
Share on other sites

I would like to restart the Emby plugin itself. At the moment I'm restarting manually in the Kodi app >> Addons > Restart Emby for Kodi.

 

Link to comment
Share on other sites

I think eventghost doesn't work on linux. If I make a python script to call one of those actions, importing the xbmc module, will it work?

I think this "xbmc.executebuiltin('RunPlugin(action)')" would be the command that I need...

Link to comment
Share on other sites

I did it via the command line with this package "xbmc-eventclients-xbmc-send". I just created a simple python script to execute the restart action:
 

#!/usr/bin/env python

import xbmc
xbmc.executebuiltin('RunPlugin(plugin://plugin.video.emby?mode=restartservice)')

and called the command:

xbmc-send --action='RunScript("/home/osmc/.kodi/addons/temp/restart-emby.py")'

Doing without the xbmc-send the module xbmc would't import, since kodi have a build-in python version.

Now it works, just what I need it. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...