mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
Update improvements
Include NzbDrone.Update in mono/osx package Do not ignore certificate warnings for services Check hash before extracting update New: Update support for Linux/OS X - see the wiki for more information
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Processes;
|
||||
|
||||
namespace NzbDrone.Update.UpdateEngine
|
||||
@@ -21,6 +22,12 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
|
||||
public AppType GetAppType()
|
||||
{
|
||||
if (OsInfo.IsMono)
|
||||
{
|
||||
//Tehcnically its the console, but its been renamed for mono (Linux/OS X)
|
||||
return AppType.Normal;
|
||||
}
|
||||
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)
|
||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
{
|
||||
|
@@ -82,7 +82,6 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
_backupAndRestore.Restore(installationFolder);
|
||||
_logger.FatalException("Failed to copy upgrade package to target folder.", e);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Processes;
|
||||
using IServiceProvider = NzbDrone.Common.IServiceProvider;
|
||||
|
||||
@@ -26,6 +27,15 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
|
||||
public void Terminate()
|
||||
{
|
||||
if (OsInfo.IsMono)
|
||||
{
|
||||
_logger.Info("Stopping all instances");
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_PROCESS_NAME);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.Info("Stopping all running services");
|
||||
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)
|
||||
@@ -35,7 +45,6 @@ namespace NzbDrone.Update.UpdateEngine
|
||||
{
|
||||
_logger.Info("NzbDrone Service is installed and running");
|
||||
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user