Add delay between service stop and framework upgrade

This commit is contained in:
Lord Hepipud 2019-11-03 22:55:21 +01:00
parent ad1756b387
commit 32d3f7d77f

View file

@ -61,6 +61,7 @@ function Install-IcingaFrameworkUpdate()
if ($ServiceStatus -eq 'Running') { if ($ServiceStatus -eq 'Running') {
Stop-IcingaService 'icingapowershell'; Stop-IcingaService 'icingapowershell';
Start-Sleep -Seconds 1;
} }
$NewDirectory = (Join-Path -Path $ModuleDirectory -ChildPath 'icinga-powershell-framework'); $NewDirectory = (Join-Path -Path $ModuleDirectory -ChildPath 'icinga-powershell-framework');