Update Deploy-ZabbixAgent2.ps1
This commit is contained in:
@@ -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")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user