#!/bin/bash
# Stop the dashboard/kanban server
if [ -f /tmp/workspace-server.pid ]; then
  PID=$(cat /tmp/workspace-server.pid)
  if ps -p $PID > /dev/null 2>&1; then
    kill $PID 2>/dev/null
    rm /tmp/workspace-server.pid
    echo "✓ Server stopped (PID $PID)"
  else
    echo "⚠ Server not running (stale PID file)"
    rm /tmp/workspace-server.pid
  fi
else
  echo "⚠ Server not running (no PID file)"
fi
