fix(windows-deploy): enforce awHostname override and safe single-instance collector restart

This commit is contained in:
igor04091968
2026-05-08 00:41:00 +03:00
parent 6f5e5eb751
commit 211a6a6eac
12 changed files with 62 additions and 4 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ function Test-SessionIsActive {
}
$cfg = Get-Config -Path $ConfigPath
$hostValue = if ($Hostname) { $Hostname } else { [string]$env:COMPUTERNAME }
$hostValue = if ($Hostname) { $Hostname } elseif ($cfg.PSObject.Properties.Name -contains 'awHostname' -and -not [string]::IsNullOrWhiteSpace([string]$cfg.awHostname)) { [string]$cfg.awHostname } else { [string]$env:COMPUTERNAME }
$apiBase = '{0}://{1}:{2}/api/0' -f [string]$cfg.server.scheme, [string]$cfg.server.host, [string]$cfg.server.port
$bucketId = 'aw-worktime-sessions_' + $hostValue
$pulse = 120