feat: external capture queue and modal-first add flow (v0.1.1)

This commit is contained in:
2026-02-25 01:40:52 +09:00
parent 552f27c002
commit e9f332171e
24 changed files with 2772 additions and 110 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
PORT="${1:-16800}"
# Kill stale aria2 process bound to the target RPC port.
PIDS="$(lsof -nP -iTCP:"$PORT" -sTCP:LISTEN -t 2>/dev/null | sort -u || true)"
if [[ -z "$PIDS" ]]; then
exit 0
fi
for pid in $PIDS; do
cmd="$(ps -p "$pid" -o command= 2>/dev/null || true)"
if [[ "$cmd" == *aria2c* ]]; then
kill -15 "$pid" 2>/dev/null || true
fi
done
sleep 0.3
PIDS="$(lsof -nP -iTCP:"$PORT" -sTCP:LISTEN -t 2>/dev/null | sort -u || true)"
if [[ -n "$PIDS" ]]; then
for pid in $PIDS; do
cmd="$(ps -p "$pid" -o command= 2>/dev/null || true)"
if [[ "$cmd" == *aria2c* ]]; then
kill -9 "$pid" 2>/dev/null || true
fi
done
fi