diff --git a/lib/core/framework/Install-IcingaFrameworkService.psm1 b/lib/core/framework/Install-IcingaFrameworkService.psm1 index ebf4db2..7fecc27 100644 --- a/lib/core/framework/Install-IcingaFrameworkService.psm1 +++ b/lib/core/framework/Install-IcingaFrameworkService.psm1 @@ -27,5 +27,11 @@ function Install-IcingaFrameworkService() throw ([string]::Format('Failed to install Icinga PowerShell Service: {0}{1}', $ServiceCreation.Message, $ServiceCreation.Error)); } + # This is just a hotfix to ensure we setup the service properly before assigning it to + # a proper user, like 'NT Authority\NetworkService'. For some reason the NetworkService + # will not start without this workaround. + # Todo: Figure out the reason and fix it properly + Set-IcingaAgentServiceUser -User 'LocalSystem' -Service 'icingapowershell' | Out-Null; + return (Set-IcingaAgentServiceUser -User $User -Password $Password -Service 'icingapowershell'); }