more update fixes.

This commit is contained in:
kay.one 2013-05-19 17:43:16 -07:00
parent 80c996c216
commit 6fc8ec6cbc
3 changed files with 9 additions and 5 deletions

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Common.Instrumentation
public UpdateLogLayoutRenderer() public UpdateLogLayoutRenderer()
{ {
_appData = Path.Combine(new EnvironmentProvider().GetUpdateLogFolder(), DateTime.Now.ToString("yy.MM.d-HH.mm")); _appData = Path.Combine(new EnvironmentProvider().GetUpdateLogFolder(), DateTime.Now.ToString("yy.MM.d-HH.mm") + ".txt");
} }

View File

@ -16,9 +16,7 @@ namespace NzbDrone.Update.Test
{ {
private const string UPDATE_FOLDER = @"C:\Temp\nzbdrone_update\nzbdrone\"; private const string UPDATE_FOLDER = @"C:\Temp\nzbdrone_update\nzbdrone\";
private const string BACKUP_FOLDER = @"C:\Temp\nzbdrone_update\nzbdrone_backup\"; private const string BACKUP_FOLDER = @"C:\Temp\nzbdrone_update\nzbdrone_backup\";
private const string SANDBOX_LOG_FOLDER = @"C:\Temp\nzbdrone_update\UpdateLogs\";
private const string TARGET_FOLDER = @"C:\NzbDrone\"; private const string TARGET_FOLDER = @"C:\NzbDrone\";
private const string UPDATE_LOG_FOLDER = @"C:\NzbDrone\UpdateLogs\";
Mock<IEnvironmentProvider> _environmentProvider; Mock<IEnvironmentProvider> _environmentProvider;

View File

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using NLog; using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using IServiceProvider = NzbDrone.Common.IServiceProvider; using IServiceProvider = NzbDrone.Common.IServiceProvider;
@ -45,7 +46,7 @@ namespace NzbDrone.Update.Providers
public virtual void Start(string targetFolder) public virtual void Start(string targetFolder)
{ {
Verify(targetFolder); Verify(targetFolder);
AppType appType = AppType.Normal; var appType = AppType.Normal;
logger.Info("Stopping all running services"); logger.Info("Stopping all running services");
@ -64,7 +65,12 @@ namespace NzbDrone.Update.Providers
//TODO:Should be able to restart service if anything beyond this point fails //TODO:Should be able to restart service if anything beyond this point fails
logger.Info("Killing all running processes"); logger.Info("Killing all running processes");
if (_processProvider.GetProcessByName(ProcessProvider.NzbDroneConsoleProcessName).Any())
{
appType = AppType.Console;
_processProvider.KillAll(ProcessProvider.NzbDroneConsoleProcessName); _processProvider.KillAll(ProcessProvider.NzbDroneConsoleProcessName);
}
_processProvider.KillAll(ProcessProvider.NzbDroneProcessName); _processProvider.KillAll(ProcessProvider.NzbDroneProcessName);
logger.Info("Creating backup of existing installation"); logger.Info("Creating backup of existing installation");