feat: gateway management scripts (start, stop, status)

This commit is contained in:
Claude Code
2026-03-28 18:58:03 -04:00
commit e8a23f2b11
4 changed files with 72 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Stop the Mortdecai gateway
PID_FILE="/tmp/mortdecai-gateway.pid"
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if kill -0 "$PID" 2>/dev/null; then
kill "$PID"
echo "Gateway stopped (PID $PID)"
else
echo "Gateway not running (stale PID file)"
fi
rm -f "$PID_FILE"
else
# Fallback: find by process name
PID=$(pgrep -f "uvicorn gateway.api" 2>/dev/null | head -1)
if [ -n "$PID" ]; then
kill "$PID"
echo "Gateway stopped (PID $PID)"
else
echo "Gateway not running"
fi
fi