feat: add headless agent management to CLI and both desktop clients
This commit is contained in:
1 parent
e91fa0235c
commit
6916dd54fb
50 files changed
+4837
-148
No files matched your search
@@ -14,8 +14,8 @@ $logFile = Join-Path $logDirectory 'agent.log'
|
||||
if ((Test-Path -LiteralPath $logFile) -and (Get-Item -LiteralPath $logFile).Length -gt 10MB) {
|
||||
Move-Item -LiteralPath $logFile -Destination ($logFile + '.1') -Force
|
||||
}
|
||||
$arguments = @('--server', [string]$config.server, '--device', [string]$config.device, '--target', [string]$config.target)
|
||||
if ($config.connect_address) { $arguments += @('--connect-address', [string]$config.connect_address) }
|
||||
$arguments = if ($config.id -and $config.devices -ne $null) { @('--quiet', '--supervise', '--config', (Join-Path $root 'agent.json')) } else { @('--server', [string]$config.server, '--device', [string]$config.device, '--target', [string]$config.target) }
|
||||
if (-not $config.id -and $config.connect_address) { $arguments += @('--connect-address', [string]$config.connect_address) }
|
||||
# Keep the child in this task's process tree. Task Scheduler owns its lifecycle.
|
||||
# Tracing writes to stdout; stderr is also retained for startup diagnostics.
|
||||
$ErrorActionPreference = 'Continue'
|
||||
|
||||
Reference in new issue
Block a user