Commit inicial - estructura base del proyecto
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
param(
|
||||
[string]$Filter = "coolify|cloudflared|nextcloud|postgres|redis|openclaw|codimd|n8n|qdrant|baserow",
|
||||
|
||||
[switch]$All
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||
$invokeSsh = Join-Path $repoRoot "scripts\Invoke-ProxmoxSsh.ps1"
|
||||
$agentScript = Join-Path $repoRoot "scripts\ProxmoxAgent.ps1"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $invokeSsh)) {
|
||||
throw "Missing Proxmox SSH wrapper: $invokeSsh"
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $agentScript)) {
|
||||
throw "Missing Proxmox agent script: $agentScript"
|
||||
}
|
||||
|
||||
. $agentScript
|
||||
$config = Get-ProxmoxConfig
|
||||
$format = "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
||||
$command = "pct exec $($config.CoolifyLxc) -- docker ps -a --format '$format'"
|
||||
$lines = @(& $invokeSsh -Command $command)
|
||||
|
||||
if ($All) {
|
||||
$lines
|
||||
return
|
||||
}
|
||||
|
||||
if ($lines.Count -gt 0) {
|
||||
$lines | Select-Object -First 1
|
||||
$lines | Select-Object -Skip 1 | Where-Object { $_ -match $Filter }
|
||||
}
|
||||
Reference in New Issue
Block a user