mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-28 02:33:14 +01:00
Updated build output structure
This commit is contained in:
parent
dc74d0b21a
commit
700af59735
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
**.DS_Store
|
||||
zbx_env/
|
||||
zbx_env*/
|
||||
.*CERT_FILE
|
||||
|
@ -74,6 +74,17 @@ function Update-Config-Var {
|
||||
|
||||
Write-Host updated
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 1) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=$") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added first occurrence"
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 0) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
|
@ -74,6 +74,17 @@ function Update-Config-Var {
|
||||
|
||||
Write-Host updated
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 1) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
$_
|
||||
if ($_ -match "^[#;] $VarName=$") {
|
||||
"$VarName=$VarValue"
|
||||
}
|
||||
} | Set-Content $ConfigPath
|
||||
|
||||
Write-Host "added first occurrence"
|
||||
}
|
||||
elseif ((Get-Content $ConfigPath | select-string -pattern "^[#;] $VarName=").length -gt 0) {
|
||||
(Get-Content $ConfigPath) |
|
||||
Foreach-Object {
|
||||
@ -86,7 +97,7 @@ function Update-Config-Var {
|
||||
Write-Host "added"
|
||||
}
|
||||
else {
|
||||
Add-Content -Path $ConfigPath -Value "$VarName=$VarValue"
|
||||
Add-Content -Path $ConfigPath -Value "$VarName=$VarValue"
|
||||
Write-Host "added at the end"
|
||||
}
|
||||
}
|
||||
@ -199,7 +210,7 @@ function Prepare-Zbx-Agent-Config {
|
||||
# Please use include to enable Perfcounter feature
|
||||
# update_config_multiple_var $ZBX_AGENT_CONFIG "PerfCounter" $env:ZBX_PERFCOUNTER
|
||||
Update-Config-Var $ZbxAgentConfig "Timeout" "$env:ZBX_TIMEOUT"
|
||||
Update-Config-Var $ZbxAgentConfig "Include" "$ZabbixConfigDir\zabbix_agentd.d\*.conf"
|
||||
Update-Config-Var $ZbxAgentConfig "Include" ".\zabbix_agentd.d\*.conf"
|
||||
Update-Config-Var $ZbxAgentConfig "UnsafeUserParameters" "$env:ZBX_UNSAFEUSERPARAMETERS"
|
||||
Update-Config-Var $ZbxAgentConfig "TLSConnect" "$env:ZBX_TLSCONNECT"
|
||||
Update-Config-Var $ZbxAgentConfig "TLSAccept" "$env:ZBX_TLSACCEPT"
|
||||
@ -217,19 +228,9 @@ function Prepare-Zbx-Agent-Config {
|
||||
|
||||
}
|
||||
|
||||
function Prepare-Zbx-Agent-Plugins-Config {
|
||||
Write-Host "** Preparing Zabbix agent 2 (plugins) configuration files"
|
||||
|
||||
Update-Config-Var "$ZabbixConfigDir/mongodb.conf" "Plugins.MongoDB.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\mongodb.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/postgresql.conf" "Plugins.PostgreSQL.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\postgresql.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/mssql.conf" "Plugins.MSSQL.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\mssql.exe"
|
||||
Update-Config-Var "$ZabbixConfigDir/ember.conf" "Plugins.EmberPlus.System.Path" "$ZabbixUserHomeDir\zabbix-agent2-plugin\ember-plus.exe"
|
||||
}
|
||||
|
||||
function PrepareAgent {
|
||||
Write-Host "** Preparing Zabbix agent 2"
|
||||
Prepare-Zbx-Agent-Config
|
||||
Prepare-Zbx-Agent-Plugins-Config
|
||||
}
|
||||
|
||||
$commandArgs=$args
|
||||
|
@ -44,7 +44,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
|
@ -35,7 +35,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\sbin | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\conf | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -ItemType directory -Path $env:ZBX_OUTPUT_DIR\zabbix-agent2-plugin | Out-Null; `
|
||||
`
|
||||
Import-Module (Get-ChildItem $env:VS_PATH -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName; `
|
||||
Enter-VsDevShell -VsInstallPath $env:VS_PATH -SkipAutomaticLocation -DevCmdArguments """-arch=$env:BUILD_ARCH"""; `
|
||||
|
@ -50,7 +50,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/database/${DB_TYPE}/ && \
|
||||
|
@ -31,7 +31,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
|
@ -54,7 +54,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/sbin/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/proxy/conf/ && \
|
||||
mkdir -p ${ZBX_OUTPUT_DIR}/java_gateway/sbin/ && \
|
||||
|
Loading…
Reference in New Issue
Block a user