Fixes the icingapowershell daemon as it has to run atleast once

This commit is contained in:
Lord Hepipud 2019-11-03 17:32:17 +01:00
parent 433b1122cb
commit 58725ee6b4

View file

@ -32,6 +32,9 @@ function Install-IcingaFrameworkService()
# will not start without this workaround. # will not start without this workaround.
# Todo: Figure out the reason and fix it properly # Todo: Figure out the reason and fix it properly
Set-IcingaAgentServiceUser -User 'LocalSystem' -Service 'icingapowershell' | Out-Null; 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'); return (Set-IcingaAgentServiceUser -User $User -Password $Password -Service 'icingapowershell');
} }