mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Print issue file during startup
This commit is contained in:
@@ -155,7 +155,27 @@ namespace Jackett.Services
|
|||||||
var x = Environment.OSVersion;
|
var x = Environment.OSVersion;
|
||||||
var runtimedir = RuntimeEnvironment.GetRuntimeDirectory();
|
var runtimedir = RuntimeEnvironment.GetRuntimeDirectory();
|
||||||
logger.Info("Environment version: " + Environment.Version.ToString() + " (" + runtimedir + ")");
|
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");
|
Type monotype = Type.GetType("Mono.Runtime");
|
||||||
if (monotype != null)
|
if (monotype != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user