From 58725ee6b46c03d0408ee05e8ee90d8ce19d85a1 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Sun, 3 Nov 2019 17:32:17 +0100 Subject: [PATCH] Fixes the icingapowershell daemon as it has to run atleast once --- lib/core/framework/Install-IcingaFrameworkService.psm1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core/framework/Install-IcingaFrameworkService.psm1 b/lib/core/framework/Install-IcingaFrameworkService.psm1 index 7fecc27..8c2a409 100644 --- a/lib/core/framework/Install-IcingaFrameworkService.psm1 +++ b/lib/core/framework/Install-IcingaFrameworkService.psm1 @@ -32,6 +32,9 @@ function Install-IcingaFrameworkService() # will not start without this workaround. # Todo: Figure out the reason and fix it properly Set-IcingaAgentServiceUser -User 'LocalSystem' -Service 'icingapowershell' | Out-Null; + Restart-IcingaService 'icingapowershell'; + Start-Sleep -Seconds 1; + Stop-IcingaService 'icingapowershell'; return (Set-IcingaAgentServiceUser -User $User -Password $Password -Service 'icingapowershell'); }