check_jar.ps1 1007 B

12345678910111213141516171819202122
  1. $ErrorActionPreference = "SilentlyContinue"
  2. # Check the fs-company startup log for his controller registration
  3. $logFile = "d:\ylrz\ylrz_saas_his_scrm\fs-company\target\fs-company.jar"
  4. # The process is running, let's check its output
  5. # Alternative: search for his controller mapping in the process command line
  6. $proc = Get-Process -Id 5372 -ErrorAction SilentlyContinue
  7. if ($proc) {
  8. Write-Output "Process 5372 command line:"
  9. Get-CimInstance Win32_Process -Filter "ProcessId = 5372" | Select-Object CommandLine | Format-List
  10. }
  11. # Also check if the his controllers are in the jar
  12. $jarPath = "d:\ylrz\ylrz_saas_his_scrm\fs-company\target\fs-company.jar"
  13. Write-Output "Checking if FsStoreController is in the jar..."
  14. $tempDir = "$env:TEMP\jar_check"
  15. New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
  16. Copy-Item $jarPath "$tempDir\check.jar" -Force
  17. Set-Location $tempDir
  18. jar tf check.jar 2>$null | Select-String "his/controller/FsStoreController" | Select-Object -First 5
  19. Write-Output "Done"