@@ -70,7 +70,7 @@ function Install-Icinga()
70
70
$JsonInstallCmd = ConvertFrom-Json - InputObject $InstallCommand - ErrorAction Stop;
71
71
} catch {
72
72
Write-IcingaConsoleError ' Failed to deserialize the provided JSON from file or command: {0}' - Objects $_.Exception.Message ;
73
- $ Global :Icinga .Protected.ServiceRestartLock = $FALSE ;
73
+ Clear-IcingaInternalServiceInformation ;
74
74
return ;
75
75
}
76
76
@@ -84,7 +84,7 @@ function Install-Icinga()
84
84
$Success = Invoke-IcingaForWindowsManagementConsoleCustomConfig - IcingaConfiguration $IcingaConfiguration ;
85
85
86
86
if ($Success -eq $FALSE ) {
87
- $ Global :Icinga .Protected.ServiceRestartLock = $FALSE ;
87
+ Clear-IcingaInternalServiceInformation ;
88
88
return ;
89
89
}
90
90
@@ -105,7 +105,7 @@ function Install-Icinga()
105
105
$Success = Invoke-IcingaForWindowsManagementConsoleCustomConfig - IcingaConfiguration $IcingaConfiguration ;
106
106
107
107
if ($Success -eq $FALSE ) {
108
- $ Global :Icinga .Protected.ServiceRestartLock = $FALSE ;
108
+ Clear-IcingaInternalServiceInformation ;
109
109
return ;
110
110
}
111
111
@@ -116,7 +116,7 @@ function Install-Icinga()
116
116
# Set our "old" swap live again. By doing so, we can still continue our old
117
117
# configuration
118
118
Set-IcingaPowerShellConfig - Path ' Framework.Config.Swap' - Value $OldConfigSwap ;
119
- $ Global :Icinga .Protected.ServiceRestartLock = $FALSE ;
119
+ Clear-IcingaInternalServiceInformation ;
120
120
return ;
121
121
}
122
122
@@ -191,7 +191,7 @@ function Install-Icinga()
191
191
}
192
192
}
193
193
194
- $ Global :Icinga .Protected.ServiceRestartLock = $FALSE ;
194
+ Clear-IcingaInternalServiceInformation ;
195
195
196
196
if ($null -ne (Get-Command - Name ' Set-IcingaForWindowsManagementConsoleClosing' - ErrorAction SilentlyContinue)) {
197
197
Set-IcingaForWindowsManagementConsoleClosing - Completed;
0 commit comments