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
View File
@@ -145,6 +145,7 @@ function Send-FileOperationEvent {
$config = Get-DeploymentConfig -Path $ConfigPath
if (-not $config) { throw "Configuration file not found: $ConfigPath" }
$script:Hostname = if ($config.PSObject.Properties.Name -contains 'awHostname' -and -not [string]::IsNullOrWhiteSpace([string]$config.awHostname)) { [string]$config.awHostname } else { [string]$env:COMPUTERNAME }
$scheme = if ($ServerScheme) { $ServerScheme } elseif ($config.server.scheme) { $config.server.scheme } else { 'http' }
$hostName = if ($ServerHost) { $ServerHost } elseif ($config.server.host) { $config.server.host } else { 'localhost' }