Files
secret/script/vault-stop.ps1
maze e3752ce910
Some checks failed
Test / tests (darwin-amd64) (push) Successful in 21s
Test / tests (linux-amd64) (push) Successful in 26s
Run Gosec / tests (push) Successful in 51s
Test / tests (linux-arm64) (push) Successful in 3m3s
Test / tests (windows-amd64) (push) Failing after 6m24s
Simplify Vault start on Windows
2025-09-09 16:29:58 +02:00

23 lines
774 B
PowerShell

if (Test-Path "vault.pid") {
$vaultPid = Get-Content "vault.pid"
Write-Host "Stopping Vault process $vaultPid"
Stop-Process -Id $vaultPid -Force
Remove-Item "vault-pid" -Force
} else {
Write-Host "No PID file found, Vault may not have started."
}
# Function to display logs
if (Test-Path "vault.out.log") {
Write-Output "=== VAULT SERVER STDOUT (last 25 lines) ==="
Get-Content "vault.out.log" -ErrorAction SilentlyContinue | Select-Object -Last 25
} else {
Write-Output "No Vault output log found!"
}
if (Test-Path "vault.err.log") {
Write-Output "=== VAULT SERVER STDERR (last 25 lines) ==="
Get-Content "vault.err.log" -ErrorAction SilentlyContinue | Select-Object -Last 25
} else {
Write-Output "No Vault error log found!"
}