generated from Ash258/GenericBucket
/
WazuhAgent-Install.json
35 lines (35 loc) · 1.78 KB
/
WazuhAgent-Install.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"version": "4.7.4",
"description": "Wazuh Agent. It communicates with the Wazuh server, sending data in near real-time through an encrypted and authenticated channel.",
"homepage": "https://wazuh.com/",
"license": "GPL-2.0-only",
"changelog": "https://documentation.wazuh.com/current/release-notes/index.html",
"url": "https://packages.wazuh.com/4.x/windows/wazuh-agent-4.7.4-1.msi#/setup.msi_",
"hash": "613c93738e061f713b1346c1d44fcb3ee1b190a7c4211e0be51fa6dbd2bc731b",
"pre_download": "Assert-Administrator",
"installer": {
"script": [
"$programname = \"programname*\"",
"$ProgramFiles = [Environment]::GetFolderPath(\"ProgramFilesX86\")",
"$filepath = \"$ProgramFiles\\ossec-agent\\VERSION\"",
"$fileversion = Get-Content -Path $filepath",
"$fileversion = $fileversion.substring(1)",
"if(((Test-Path -Path $filepath -PathType Leaf) -eq $false) -or ([System.Version]\"$fileversion\" -lt [System.Version]\"$version\"))",
"{",
" Invoke-ExternalCommand msiexec -ArgumentList @('/i', \"$dir\\setup.msi_\", '/qn') -RunAs | Out-Null",
" if(((Test-Path -Path $filepath -PathType Leaf) -eq $false) -or ([System.Version]\"$fileversion\" -lt [System.Version]\"$version\"))",
" {",
" exit 1",
" }",
"}",
"if (Test-Path -Path \"$dir\\setup.msi_\") { Remove-Item \"$dir\\setup.msi_\" -Force }"
]
},
"checkver": {
"url": "https://documentation.wazuh.com/current/release-notes/index.html",
"regex": "<span class=\"doc\">([\\d.]+)"
},
"autoupdate": {
"url": "https://packages.wazuh.com/$majorVersion.x/windows/wazuh-agent-$version-1.msi#/setup.msi_"
}
}