Changed script to show running window.
Also added various checks for terminating process.
This commit is contained in:
parent
919c5201e4
commit
690abbdbe0
@ -1,3 +1,8 @@
|
||||
if (Test-Path ./pid.temp) {
|
||||
$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1
|
||||
if (Get-Process -Id $sID -ErrorAction SilentlyContinue) {
|
||||
Stop-Process -Id $sID
|
||||
}
|
||||
Remove-Item "./pid.temp"
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar" -NoNewWindow -PassThru
|
||||
$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar", "nogui" -PassThru
|
||||
$SID = $SID.Id
|
||||
$SID | Out-File -FilePath "pid.temp"
|
Loading…
Reference in New Issue
Block a user