mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Fixes PowerShell daemon service registration
This commit is contained in:
parent
f67224114a
commit
cfba374227
1 changed files with 6 additions and 0 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue