diff --git a/SS14.Watchdog/Components/ServerManagement/ServerInstance.Actor.cs b/SS14.Watchdog/Components/ServerManagement/ServerInstance.Actor.cs index 1d68df6..e5d3fd6 100644 --- a/SS14.Watchdog/Components/ServerManagement/ServerInstance.Actor.cs +++ b/SS14.Watchdog/Components/ServerManagement/ServerInstance.Actor.cs @@ -329,9 +329,10 @@ private async Task StartServer(CancellationToken cancel) var args = new List { // Watchdog comms config. - "--cvar", $"watchdog.token={Secret}", "--cvar", $"watchdog.key={Key}", "--cvar", $"watchdog.baseUrl={_baseServerAddress}", + // watchdog.token provided through ENV vars, as this does not show up in process listings + // like `ps -aux` or `htop`. "--config-file", Path.Combine(InstanceDir, "config.toml"), "--data-dir", Path.Combine(InstanceDir, "data"), @@ -343,7 +344,11 @@ private async Task StartServer(CancellationToken cancel) args.Add(arg); } - var env = new List<(string, string)>(); + var env = new List<(string, string)> + { + // __ is replaced by a . when parsing CVars from an environment variable. + ("ROBUST_CVAR_watchdog__token", $"{Secret}") + }; foreach (var (envVar, value) in _instanceConfig.EnvironmentVariables) {