mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
Adds script termination in case Agent is not installed for Agent Binary fetching
This commit is contained in:
parent
401ac2ed53
commit
714827bc0a
1 changed files with 4 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue