Jump to content

Proper way to shutdown Emby from command line or API call


Recommended Posts

Posted

Is there a proper way to shutdown emby "programically" so that it closes the library.db?

 

I use "/usr/sbin/service emby-server restart" to restart daily. Running "/usr/sbin/service $instance stop" actually leaves the library.db in an unclosed state.  Stopping emby from the shutdown button in the web ui doesn't have this issue.  I'd like to incorporate a procedure to backup the library.db file when I restart each day for quick recovery when needed.

mastrmind11
Posted

Is there a proper way to shutdown emby "programically" so that it closes the library.db?

 

I use "/usr/sbin/service emby-server restart" to restart daily. Running "/usr/sbin/service $instance stop" actually leaves the library.db in an unclosed state.  Stopping emby from the shutdown button in the web ui doesn't have this issue.  I'd like to incorporate a procedure to backup the library.db file when I restart each day for quick recovery when needed.

Open developer tools in Chrome and hit the button.  Should show you the command being sent to the server via the shutdown button.  Presumably you can just curl that command from the cli.  Just a thought.

PenkethBoy
Posted

@ddurdle 

 

the end point you want is

 

"/system/shutdown" but it requires authorisation by an Admin Account

 

if successful you will get a 204 status code from your Post

 

its in swagger so you can test there

  • Like 1

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
×
×
  • Create New...