feat: single deploy startup, stop mode, notification_body 1.2.31-SAC
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-2
@@ -253,12 +253,18 @@ function Get-SacHostBlock {
|
||||
hostname = $hostname
|
||||
os_family = 'windows'
|
||||
}
|
||||
if (Get-Variable -Name ServerDisplayName -ErrorAction SilentlyContinue) {
|
||||
$displayLabel = $hostname
|
||||
if (Get-Command -Name Get-MonitorServerLabelWithIp -ErrorAction SilentlyContinue) {
|
||||
$displayLabel = [string](Get-MonitorServerLabelWithIp)
|
||||
} elseif (Get-Variable -Name ServerDisplayName -ErrorAction SilentlyContinue) {
|
||||
$label = (Get-Variable -Name ServerDisplayName -ValueOnly)
|
||||
if (-not [string]::IsNullOrWhiteSpace([string]$label)) {
|
||||
$hostBlock.display_name = [string]$label.Trim()
|
||||
$displayLabel = [string]$label.Trim()
|
||||
}
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($displayLabel)) {
|
||||
$hostBlock.display_name = $displayLabel
|
||||
}
|
||||
$ipv4 = Get-SacHostIPv4
|
||||
if (-not [string]::IsNullOrWhiteSpace($ipv4)) {
|
||||
$hostBlock.ipv4 = $ipv4
|
||||
|
||||
Reference in New Issue
Block a user