|
|
@ -19,17 +19,25 @@ namespace NzbDrone.Update.UpdateEngine
|
|
|
|
private readonly ITerminateNzbDrone _terminateNzbDrone;
|
|
|
|
private readonly ITerminateNzbDrone _terminateNzbDrone;
|
|
|
|
private readonly IAppFolderInfo _appFolderInfo;
|
|
|
|
private readonly IAppFolderInfo _appFolderInfo;
|
|
|
|
private readonly IBackupAndRestore _backupAndRestore;
|
|
|
|
private readonly IBackupAndRestore _backupAndRestore;
|
|
|
|
|
|
|
|
private readonly IBackupAppData _backupAppData;
|
|
|
|
private readonly IStartNzbDrone _startNzbDrone;
|
|
|
|
private readonly IStartNzbDrone _startNzbDrone;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public InstallUpdateService(IDiskProvider diskProvider, IDetectApplicationType detectApplicationType, ITerminateNzbDrone terminateNzbDrone,
|
|
|
|
public InstallUpdateService(IDiskProvider diskProvider,
|
|
|
|
IAppFolderInfo appFolderInfo, IBackupAndRestore backupAndRestore, IStartNzbDrone startNzbDrone, Logger logger)
|
|
|
|
IDetectApplicationType detectApplicationType,
|
|
|
|
|
|
|
|
ITerminateNzbDrone terminateNzbDrone,
|
|
|
|
|
|
|
|
IAppFolderInfo appFolderInfo,
|
|
|
|
|
|
|
|
IBackupAndRestore backupAndRestore,
|
|
|
|
|
|
|
|
IBackupAppData backupAppData,
|
|
|
|
|
|
|
|
IStartNzbDrone startNzbDrone,
|
|
|
|
|
|
|
|
Logger logger)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_detectApplicationType = detectApplicationType;
|
|
|
|
_detectApplicationType = detectApplicationType;
|
|
|
|
_terminateNzbDrone = terminateNzbDrone;
|
|
|
|
_terminateNzbDrone = terminateNzbDrone;
|
|
|
|
_appFolderInfo = appFolderInfo;
|
|
|
|
_appFolderInfo = appFolderInfo;
|
|
|
|
_backupAndRestore = backupAndRestore;
|
|
|
|
_backupAndRestore = backupAndRestore;
|
|
|
|
|
|
|
|
_backupAppData = backupAppData;
|
|
|
|
_startNzbDrone = startNzbDrone;
|
|
|
|
_startNzbDrone = startNzbDrone;
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -59,7 +67,8 @@ namespace NzbDrone.Update.UpdateEngine
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_terminateNzbDrone.Terminate();
|
|
|
|
_terminateNzbDrone.Terminate();
|
|
|
|
|
|
|
|
|
|
|
|
_backupAndRestore.BackUp(installationFolder);
|
|
|
|
_backupAndRestore.Backup(installationFolder);
|
|
|
|
|
|
|
|
_backupAppData.Backup();
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Moving update package to target");
|
|
|
|
_logger.Info("Moving update package to target");
|
|
|
|
|
|
|
|
|
|
|
|