Jump to content

Shutdown/Restart/Update on service vs application


FordGT90Concept

Recommended Posts

FordGT90Concept

Some observations that should be fixed. I have Emby Server installed as a Windows Service:

 

-When updating Emby Server, setup automatically starts the Emby Server application (try icon) instead of the Windows service. If it is installed as a service, it should trigger the service to start instead.

 

-In the Emby Server web UI, I only see a "Shutdown" button and no "Restart" button. A restart button to call on the service to restart would be very nice so all admins can restart Emby Server if there is problems. Presently, only I (server administrator) can get into the Windows services panel and tell the Emby Server service to start or restart.

Link to comment
Share on other sites

-When updating Emby Server, setup automatically starts the Emby Server application (try icon) instead of the Windows service. If it is installed as a service, it should trigger the service to start instead.

 

It is always installed as a service so it's not that simple.

Link to comment
Share on other sites

Happy2Play

@@Luke

 

As long as there is an update in the update folder restarting the service performs the update. (at least on my test Windows machine)

 

Tested by putting updates folder with an update in Emby-Server folder while service was running and restarted service.

Link to comment
Share on other sites

@@Luke

 

As long as there is an update in the update folder restarting the service performs the update. (at least on my test Windows machine)

 

Tested by putting updates folder with an update in Emby-Server folder while service was running and restarted service.

 

Thanks. That's easily corrected.

Link to comment
Share on other sites

FordGT90Concept

Can use ServiceController class to check if the service is running:

http://www.devcurry.com/2010/03/programmatically-determine-if-windows.html

 

If running, stop then start the service or else Process.Start Emby Server.

 

 

Also, side note, but I find it odd how Emby Server uses local user files (e.g. C:\Users\NAME\AppData\Roaming) instead of machine files (e.g. C:\ProgramData). Advantage of a service is it can run without a user logged in to the machine.

Edited by FordGT90Concept
Link to comment
Share on other sites

Can use ServiceController class to check if the service is running:

http://www.devcurry.com/2010/03/programmatically-determine-if-windows.html

 

If running, stop then start the service or else Process.Start Emby Server.

 

 

Also, side note, but I find it odd how Emby Server uses local user files (e.g. C:\Users\NAME\AppData\Roaming) instead of machine files (e.g. C:\ProgramData). Advantage of a service is it can run without a user logged in to the machine.

 

The problem is that requires elevation...

Link to comment
Share on other sites

FordGT90Concept

I assume you're talking about ProgramData. I don't think it is a problem if the service is running under LocalMachine (as opposed to CurrentUser). This will require admin rights to install the service during setup but it shouldn't after that. That said, moving the directory isn't as important to me as allowing users to restart the service through the Emby web UI. If that requires elevated permissions, you might be able to get around it by calling "net stop" and "net start."

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