diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs b/MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs deleted file mode 100644 index be381fe96..000000000 --- a/MediaBrowser.ServerApplication/BackgroundServiceInstaller.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections; -using System.ComponentModel; -using System.ServiceProcess; - -namespace MediaBrowser.ServerApplication -{ - [RunInstaller(true)] - public class BackgroundServiceInstaller : System.Configuration.Install.Installer - { - public BackgroundServiceInstaller() - { - var process = new ServiceProcessInstaller - { - Account = ServiceAccount.LocalSystem - }; - - var serviceAdmin = new ServiceInstaller - { - StartType = ServiceStartMode.Manual, - ServiceName = BackgroundService.Name, - DisplayName = BackgroundService.DisplayName, - - DelayedAutoStart = true, - - Description = "The windows background service for Emby Server.", - - // Will ensure the network is available - ServicesDependedOn = new[] { "LanmanServer", "EventLog", "Tcpip", "http" } - }; - - // Microsoft didn't add the ability to add a - // description for the services we are going to install - // To work around this we'll have to add the - // information directly to the registry but I'll leave - // this exercise for later. - - // now just add the installers that we created to our - // parents container, the documentation - // states that there is not any order that you need to - // worry about here but I'll still - // go ahead and add them in the order that makes sense. - Installers.Add(process); - Installers.Add(serviceAdmin); - } - - protected override void OnBeforeInstall(IDictionary savedState) - { - Context.Parameters["assemblypath"] = "\"" + - Context.Parameters["assemblypath"] + "\" " + GetStartArgs(); - base.OnBeforeInstall(savedState); - } - - protected override void OnBeforeUninstall(IDictionary savedState) - { - Context.Parameters["assemblypath"] = "\"" + - Context.Parameters["assemblypath"] + "\" " + GetStartArgs(); - base.OnBeforeUninstall(savedState); - } - - private string GetStartArgs() - { - return "-service"; - } - } -} |
