feat: implement server-wide management actions and enhance TUI dashboard

This commit is contained in:
2026-03-04 20:51:02 +00:00
parent 150f9d2990
commit ddec55871b
13 changed files with 621 additions and 52 deletions
+7 -4
View File
@@ -55,11 +55,14 @@ case "$CMD" in
killed=0
for id in "${agents[@]}"; do
pid="$(read_pid "$id")"
if [[ "$pid" -gt 0 ]] && kill -0 "$pid" 2>/dev/null; then
kill -9 "$pid" 2>/dev/null || true
all_pids="$(find_agent_pids "$id")"
if [[ -n "$all_pids" ]]; then
cnt="$(echo "$all_pids" | wc -l)"
for p in $all_pids; do
kill -9 "$p" 2>/dev/null || true
done
rm -f "$(pid_file "$id")"
ok "$id killed (PID $pid)"
ok "$id killed ($cnt instance(s), PIDs: $(echo $all_pids | tr '\n' ' '))"
((killed++)) || true
else
dim " $id (no estaba corriendo)"