From d2dd0c85b8966bf20b8bfbf896c460db794c461c Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 18 Dec 2024 15:57:02 -0600 Subject: add headless option --- config/slskd.example.yml | 1 + src/slskd/Core/Options.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/config/slskd.example.yml b/config/slskd.example.yml index c29f8ebb..dd164084 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -1,4 +1,5 @@ # debug: false +# headless: false # remote_configuration: false # remote_file_management: false # instance_name: default diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 32188aef..ff9cc407 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -151,6 +151,15 @@ namespace slskd [RequiresRestart] public bool Debug { get; init; } = Debugger.IsAttached; + /// + /// Gets a value indicating whether the application should run in headless (no web UI) mode. + /// + [Argument('H', "headless")] + [EnvironmentVariable("HEADLESS")] + [Description("run in headless (no web UI) mode")] + [RequiresRestart] + public bool Headless { get; init; } = false; + /// /// Gets a value indicating whether remote configuration of options is allowed. /// -- cgit v1.2.3