diff --git a/NzbDrone.Update/Providers/UpdateProvider.cs b/NzbDrone.Update/Providers/UpdateProvider.cs index c05a6de21..cd781e0ea 100644 --- a/NzbDrone.Update/Providers/UpdateProvider.cs +++ b/NzbDrone.Update/Providers/UpdateProvider.cs @@ -59,13 +59,16 @@ public virtual void Start(string targetFolder) _serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME); } - //TODO:Should be able to restart service if anything beyond this point fails + else + { + appType = AppType.Normal; + } + //TODO:Should be able to restart service if anything beyond this point fails logger.Info("Killing all running processes"); var processes = _processProvider.GetProcessByName(ProcessProvider.NzbDroneProccessName); foreach (var processInfo in processes) { - appType = AppType.Normal; _processProvider.Kill(processInfo.Id); } diff --git a/NzbDrone/Router.cs b/NzbDrone/Router.cs index f980646bb..c4c34ef17 100644 --- a/NzbDrone/Router.cs +++ b/NzbDrone/Router.cs @@ -36,29 +36,32 @@ public void Route(IEnumerable args) public void Route(ApplicationMode applicationMode) { - logger.Info("Application mode: {0}", applicationMode); - if(!_environmentProvider.IsUserInteractive) { applicationMode = ApplicationMode.Service; } - switch (applicationMode) + logger.Info("Application mode: {0}", applicationMode); + + switch (applicationMode) { case ApplicationMode.Service: { + logger.Trace("Service selected"); _serviceProvider.Run(_applicationServer); break; } case ApplicationMode.Console: { + logger.Trace("Console selected"); _applicationServer.Start(); _consoleProvider.WaitForClose(); break; } case ApplicationMode.InstallService: { + logger.Trace("Install Service selected"); if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)) { _consoleProvider.PrintServiceAlreadyExist(); @@ -72,6 +75,7 @@ public void Route(ApplicationMode applicationMode) } case ApplicationMode.UninstallService: { + logger.Trace("Uninstall Service selected"); if (!_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)) { _consoleProvider.PrintServiceDoestExist();