Add PIDFile CLI option

This commit is contained in:
kaso17
2017-12-04 12:20:22 +01:00
parent 105bd85441
commit 2934bfb3e7
6 changed files with 56 additions and 12 deletions

View File

@@ -64,9 +64,10 @@ namespace Jackett.Common.Models.Config
public string DataFolder { get; set; }
[Option("NoRestart", HelpText = "Don't restart after update")]
public bool NoRestart { get; set; }
public bool NoRestart { get; set; }
[Option("PIDFile", HelpText = "Specify the location of PID file")]
public string PIDFile { get; set; }
public RuntimeSettings ToRunTimeSettings()
{
@@ -83,7 +84,7 @@ namespace Jackett.Common.Models.Config
if (options.ListenPublic && options.ListenPrivate)
{
Console.WriteLine("You can only use listen private OR listen publicly.");
Environment.Exit(1);
Engine.Exit(1);
}
// SSL Fix
@@ -105,6 +106,8 @@ namespace Jackett.Common.Models.Config
if (!string.IsNullOrWhiteSpace(options.DataFolder))
runtimeSettings.CustomDataFolder = options.DataFolder;
runtimeSettings.PIDFile = options.PIDFile;
return runtimeSettings;
}