2024-03-13 11:50:36 -04:00
|
|
|
function Restart-IcingaForWindows()
|
2021-08-06 12:12:27 -04:00
|
|
|
{
|
|
|
|
|
[string]$JeaPid = Get-IcingaJEAServicePid;
|
|
|
|
|
|
|
|
|
|
Stop-IcingaService -Service 'icingapowershell';
|
|
|
|
|
|
|
|
|
|
if ((Test-IcingaJEAServiceRunning -JeaPid $JeaPid)) {
|
2024-02-28 05:12:46 -05:00
|
|
|
Stop-IcingaJEAProcess -JeaPid $JeaPid;
|
2021-08-06 12:12:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Restart-IcingaService -Service 'icingapowershell';
|
2024-09-19 06:07:25 -04:00
|
|
|
# Update the process priority after each restart
|
|
|
|
|
Start-IcingaWindowsScheduledTaskProcessPriority;
|
2021-08-06 12:12:27 -04:00
|
|
|
}
|
2024-03-13 11:50:36 -04:00
|
|
|
|
|
|
|
|
Set-Alias -Name 'Restart-IcingaWindowsService' -Value 'Restart-IcingaForWindows';
|