mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-13 18:27:08 -07:00
Disable update for docker containers (#715)
Also add docker info to about page and sentry context
This commit is contained in:
parent
6afece237c
commit
4be01a5a95
13 changed files with 101 additions and 30 deletions
|
@ -32,6 +32,7 @@ namespace NzbDrone.Core.Update
|
|||
private readonly IConfigFileProvider _configFileProvider;
|
||||
private readonly IRuntimeInfo _runtimeInfo;
|
||||
private readonly IBackupService _backupService;
|
||||
private readonly IOsInfo _osInfo;
|
||||
|
||||
|
||||
public InstallUpdateService(ICheckUpdateService checkUpdateService,
|
||||
|
@ -46,6 +47,7 @@ namespace NzbDrone.Core.Update
|
|||
IConfigFileProvider configFileProvider,
|
||||
IRuntimeInfo runtimeInfo,
|
||||
IBackupService backupService,
|
||||
IOsInfo osInfo,
|
||||
Logger logger)
|
||||
{
|
||||
if (configFileProvider == null)
|
||||
|
@ -64,6 +66,7 @@ namespace NzbDrone.Core.Update
|
|||
_configFileProvider = configFileProvider;
|
||||
_runtimeInfo = runtimeInfo;
|
||||
_backupService = backupService;
|
||||
_osInfo = osInfo;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
|
@ -204,6 +207,11 @@ namespace NzbDrone.Core.Update
|
|||
return;
|
||||
}
|
||||
|
||||
if (_osInfo.IsDocker)
|
||||
{
|
||||
throw new CommandFailedException("Updating is disabled inside a docker container. Please update the container image.");
|
||||
}
|
||||
|
||||
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && message.Trigger != CommandTrigger.Manual)
|
||||
{
|
||||
_logger.ProgressDebug("Auto-update not enabled, not installing available update");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue