diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-05-23 16:44:15 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-05-23 16:44:15 -0400 |
| commit | d0c9273d679cfec73c10e6f863c5cf9012a3aa2f (patch) | |
| tree | 6c6b595c169911e981ea43882dbcc864f1678d50 /MediaBrowser.ServerApplication/MainStartup.cs | |
| parent | 25e325481db84629fa5b42a4bf8b1cf6f1761057 (diff) | |
install service with Emby name
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 6e8774eea..f918fc37c 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -370,7 +370,8 @@ namespace MediaBrowser.ServerApplication private static void RunServiceInstallationIfNeeded(string applicationPath) { - var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == BackgroundService.Name); + var serviceName = BackgroundService.GetExistingServiceName(); + var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName); if (ctl == null) { @@ -476,7 +477,7 @@ namespace MediaBrowser.ServerApplication // Update is there - execute update try { - var serviceName = _isRunningAsService ? BackgroundService.Name : string.Empty; + var serviceName = _isRunningAsService ? BackgroundService.GetExistingServiceName() : string.Empty; new ApplicationUpdater().UpdateApplication(appPaths, updateArchive, logger, serviceName); // And just let the app exit so it can update @@ -539,7 +540,7 @@ namespace MediaBrowser.ServerApplication private static void ShutdownWindowsService() { _logger.Info("Stopping background service"); - var service = new ServiceController(BackgroundService.Name); + var service = new ServiceController(BackgroundService.GetExistingServiceName()); service.Refresh(); |
