mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-20 09:57:43 +02:00
Updated Zabbix agent 2 for Windows
This commit is contained in:
parent
24d47aab16
commit
98ab8d4d69
@ -286,14 +286,17 @@ USER ContainerAdministrator
|
|||||||
|
|
||||||
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
|
RUN $env:PATH = [string]::Format('{0}\zabbix\sbin;{0}\zabbix\bin;', $env:SystemDrive) + $env:PATH; `
|
||||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
||||||
|
`
|
||||||
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
$env:ZBX_HOME = [string]::Format('{0}\zabbix', $env:SystemDrive); `
|
||||||
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine);
|
[Environment]::SetEnvironmentVariable('ZBX_HOME', $env:ZBX_HOME, [EnvironmentVariableTarget]::Machine);
|
||||||
|
|
||||||
RUN Set-Location -Path "$env:SystemDrive"\; `
|
RUN Set-Location -Path $env:SystemDrive\.; `
|
||||||
|
`
|
||||||
New-Item -ItemType directory -Path "$env:ZBX_HOME\conf\zabbix_agentd.d" | Out-Null; `
|
New-Item -ItemType directory -Path "$env:ZBX_HOME\conf\zabbix_agentd.d" | Out-Null; `
|
||||||
New-Item -ItemType directory -Path "$env:ZBX_HOME\enc" | Out-Null; `
|
New-Item -ItemType directory -Path "$env:ZBX_HOME\enc" | Out-Null; `
|
||||||
New-Item -ItemType directory -Path "$env:ZBX_HOME\modules" | Out-Null; `
|
New-Item -ItemType directory -Path "$env:ZBX_HOME\modules" | Out-Null; `
|
||||||
New-Item -ItemType directory -Path "$env:ZBX_HOME\buffer" | Out-Null; `
|
New-Item -ItemType directory -Path "$env:ZBX_HOME\buffer" | Out-Null; `
|
||||||
|
`
|
||||||
net user /add zabbix; `
|
net user /add zabbix; `
|
||||||
$acl = Get-Acl -Path $env:ZBX_HOME; `
|
$acl = Get-Acl -Path $env:ZBX_HOME; `
|
||||||
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user