Print issue file during startup

This commit is contained in:
kaso17
2017-02-01 12:25:02 +01:00
parent 9c13462da0
commit 9caccc5f93

View File

@@ -155,7 +155,27 @@ namespace Jackett.Services
var x = Environment.OSVersion;
var runtimedir = RuntimeEnvironment.GetRuntimeDirectory();
logger.Info("Environment version: " + Environment.Version.ToString() + " (" + runtimedir + ")");
logger.Info("OS version: " + Environment.OSVersion.ToString() + (Environment.Is64BitOperatingSystem ? " (64bit OS)" : "") + (Environment.Is64BitProcess ? " (64bit process)" : ""));
logger.Info("OS version: " + Environment.OSVersion.ToString() + (Environment.Is64BitOperatingSystem ? " (64bit OS)" : "") + (Environment.Is64BitProcess ? " (64bit process)" : ""));
try
{
var issuefile = "/etc/issue";
if (File.Exists(issuefile))
{
using (StreamReader reader = new StreamReader(issuefile))
{
string firstLine;
firstLine = reader.ReadLine();
if (firstLine != null)
logger.Info("issue: " + firstLine);
}
}
}
catch (Exception e)
{
logger.Error(e, "Error while reading the issue file");
}
Type monotype = Type.GetType("Mono.Runtime");
if (monotype != null)
{