mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
parent
4f8b51ce78
commit
09d7bf9050
1 changed files with 6 additions and 4 deletions
|
|
@ -50,15 +50,17 @@ function Install-IcingaAgentCertificates()
|
||||||
|
|
||||||
# Argument --key for save-cert is deprecated starting with Icinga 2.12.0
|
# Argument --key for save-cert is deprecated starting with Icinga 2.12.0
|
||||||
if (Compare-IcingaVersions -RequiredVersion '2.12.0') {
|
if (Compare-IcingaVersions -RequiredVersion '2.12.0') {
|
||||||
$arguments = [string]::Format('pki save-cert --trustedcert {0}trusted-parent.crt --host {1}',
|
$arguments = [string]::Format('pki save-cert --trustedcert {0}trusted-parent.crt --host {1} --port {2}',
|
||||||
$CertificateDirectory,
|
$CertificateDirectory,
|
||||||
$Endpoint
|
$Endpoint,
|
||||||
|
$Port
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$arguments = [string]::Format('pki save-cert --key {0}{1}.key --trustedcert {0}trusted-parent.crt --host {2}',
|
$arguments = [string]::Format('pki save-cert --key {0}{1}.key --trustedcert {0}trusted-parent.crt --host {2} --port {3}',
|
||||||
$CertificateDirectory,
|
$CertificateDirectory,
|
||||||
$Hostname,
|
$Hostname,
|
||||||
$Endpoint
|
$Endpoint,
|
||||||
|
$Port
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue