A remote path mapping health check (#617)

This commit is contained in:
ta264
2019-04-04 16:15:43 +01:00
committed by GitHub
parent 0762805572
commit e27369686b
12 changed files with 360 additions and 15 deletions
@@ -14,7 +14,8 @@ namespace NzbDrone.Common.EnvironmentInfo
public static bool IsLinux => Os == Os.Linux;
public static bool IsOsx => Os == Os.Osx;
public static bool IsWindows => Os == Os.Windows;
public static bool IsDocker { get; }
public string Version { get; }
public string Name { get; }
public string FullName { get; }
@@ -44,6 +45,10 @@ namespace NzbDrone.Common.EnvironmentInfo
else
{
Os = Os.Linux;
if (File.Exists("/proc/1/cgroup") && File.ReadAllText("/proc/1/cgroup").Contains("/docker/"))
{
IsDocker = true;
}
}
break;
}
@@ -101,4 +106,4 @@ namespace NzbDrone.Common.EnvironmentInfo
Linux,
Osx
}
}
}