mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
15 lines
429 B
PowerShell
15 lines
429 B
PowerShell
function Get-IcingaAgentBinary()
|
|
{
|
|
$IcingaRootDir = Get-IcingaAgentRootDirectory;
|
|
if ([string]::IsNullOrEmpty($IcingaRootDir)) {
|
|
throw 'The Icinga Agent seems not to be installed';
|
|
}
|
|
|
|
$IcingaBinary = (Join-Path -Path $IcingaRootDir -ChildPath '\sbin\icinga2.exe');
|
|
|
|
if ((Test-Path $IcingaBinary) -eq $FALSE) {
|
|
throw 'Icinga Agent binary could not be found';
|
|
}
|
|
|
|
return $IcingaBinary;
|
|
}
|