diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-12-18 15:57:02 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-12-18 15:57:02 -0600 |
| commit | d2dd0c85b8966bf20b8bfbf896c460db794c461c (patch) | |
| tree | 3b437ef1dc3845e76f770a03867a8344d67c9cb4 | |
| parent | cfcdeff46861cdd11a5cbafe533ce08bda584566 (diff) | |
| download | slskd-d2dd0c85b8966bf20b8bfbf896c460db794c461c.tar.gz | |
add headless option
| -rw-r--r-- | config/slskd.example.yml | 1 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 9 |
2 files changed, 10 insertions, 0 deletions
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 @@ -152,6 +152,15 @@ namespace slskd public bool Debug { get; init; } = Debugger.IsAttached; /// <summary> + /// Gets a value indicating whether the application should run in headless (no web UI) mode. + /// </summary> + [Argument('H', "headless")] + [EnvironmentVariable("HEADLESS")] + [Description("run in headless (no web UI) mode")] + [RequiresRestart] + public bool Headless { get; init; } = false; + + /// <summary> /// Gets a value indicating whether remote configuration of options is allowed. /// </summary> [Argument(default, "remote-configuration")] |
