mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
12 lines
358 B
PowerShell
12 lines
358 B
PowerShell
|
|
function Get-IcingaJEAServicePid()
|
||
|
|
{
|
||
|
|
[string]$JeaPidFile = (Join-Path -Path (Get-IcingaCacheDir) -ChildPath 'jea.pid');
|
||
|
|
[string]$JeaPid = Read-IcingaFileSecure -File $JeaPidFile;
|
||
|
|
|
||
|
|
if ([string]::IsNullOrEmpty($JeaPid) -eq $FALSE) {
|
||
|
|
$JeaPid = $JeaPid.Replace("`r`n", '').Replace("`n", '').Replace(' ', '');
|
||
|
|
}
|
||
|
|
|
||
|
|
return $JeaPid;
|
||
|
|
}
|