Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When upgrading Emby Server for Windows, check for service #1764

Closed
nexxai opened this issue May 22, 2016 · 4 comments
Closed

When upgrading Emby Server for Windows, check for service #1764

nexxai opened this issue May 22, 2016 · 4 comments

Comments

@nexxai
Copy link

nexxai commented May 22, 2016

In Windows, I have Emby Server installed as a service. When I go to upgrade the server, I stop the service, run the installer, but then the installer starts the server app as an interactive process, which I then have to kill and then start the service manually. Normally this isn't too much of a problem (more just annoying than anything) but with the upgrade to .5970, the DB upgrade started and I have to wait (hours) for it to finish so that the DB upgrade doesn't break.

What I was wondering is if in the installer/upgrader, there could be a check to see if the server is installed as a service, and if so, just start the service rather than running the app interactively.

@jpdillingham
Copy link

Is the source for the installer/updater available? I see the binaries in the "Tools" folder but that's it.

@gerritv
Copy link

gerritv commented Dec 3, 2016

@LukePulverenti If we can get source for the updater then I am willing to have a go at this. Or some hints on the Setup/Updater flow. Trolling the source tree hasn't provide a way into solving the problem.

@gerritv
Copy link

gerritv commented Dec 9, 2016

I think this is a user error Issue, not a defect/missing functionality.

Looking at the source code, MediaBrowser.ServerApplication:MainStartup.cs checks to see if running as a service as part of its PerformUpdateIfNeeded() code. It would appear that if you are running MB as a service, you should not stop the service prior to doing the update. Updater.exe (which I can't see the source code for??) is passed the service name to restart after the update completes.

So the solution is: don't stop the service prior to doing an update.

@LukePulverenti
Copy link
Member

Occasionally an update will require user interaction, therefore I don't think this is something we want to do. You guys are encouraged to try the new .NET Core version of Emby Server which is currently in testing, and there is a new process for the Windows Service:
https://emby.media/community/index.php?/topic/50012-emby-server-for-net-core/

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants