Update Deploy-ZabbixAgent2.ps1

This commit is contained in:
2026-09-14 11:29:02 +10:00
parent e50dc2259c
commit 85f9c172de

View File

@@ -6,7 +6,7 @@ $ErrorActionPreference = "Stop"
# --- 1. Versioned Idempotency Check --- # --- 1. Versioned Idempotency Check ---
$markerDir = "C:\ProgramData\Zabbix" $markerDir = "C:\ProgramData\Zabbix"
$marker = "$markerDir\installed_v3.flag" $marker = "$markerDir\installed_v4.flag"
$service = Get-Service -Name "Zabbix Agent 2" -ErrorAction SilentlyContinue $service = Get-Service -Name "Zabbix Agent 2" -ErrorAction SilentlyContinue
if ((Test-Path $marker) -and ($service -and $service.Status -eq "Running")) { if ((Test-Path $marker) -and ($service -and $service.Status -eq "Running")) {