2022-12-04 05:09:04 +00:00
|
|
|
if (Test-Path ./test-server.pid) {
|
|
|
|
$sID = Get-Item -Path ./test-server.pid | Get-Content -Tail 1
|
2020-04-22 03:39:19 -05:00
|
|
|
if (Get-Process -Id $sID -ErrorAction SilentlyContinue) {
|
|
|
|
Stop-Process -Id $sID
|
|
|
|
}
|
2022-12-04 05:09:04 +00:00
|
|
|
Remove-Item "./test-server.pid"
|
|
|
|
} else {
|
|
|
|
Write-Output "Couldn't find running server to stop."
|
|
|
|
}
|