import: contenido inicial de la skill bitwarden

This commit is contained in:
2026-04-26 14:22:15 -06:00
parent 976454dc79
commit 5534ab954c
9 changed files with 872 additions and 1 deletions

26
scripts/serve-down.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# bitwarden skill — para `bw serve` y limpia cache de PID.
# La session NO se borra (la podés reusar al re-arrancar).
set -euo pipefail
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PID_FILE="$SKILL_DIR/.cache/serve.pid"
if [[ ! -f "$PID_FILE" ]]; then
echo "→ No hay PID file, asumimos que serve no estaba corriendo."
exit 0
fi
pid="$(cat "$PID_FILE")"
if [[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null; then
echo "→ Matando bw serve (PID $pid)..."
kill "$pid" 2>/dev/null || true
sleep 1
if kill -0 "$pid" 2>/dev/null; then
kill -9 "$pid" 2>/dev/null || true
fi
fi
rm -f "$PID_FILE"
echo "→ Listo."