OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git / scripts / pear-git-stop.sh

31 lines · bash ref:
#!/bin/bash

# Stop pear-git server in tmux

set -e

SESSION="pear-seed"
WINDOW="pear-git"

# Check if window exists
if ! tmux list-windows -t "$SESSION" 2>/dev/null | grep -q "$WINDOW"; then
  echo "❌ No pear-git window found in $SESSION session"
  exit 1
fi

echo "Stopping pear-git server..."

# Send Ctrl+C to stop server
tmux send-keys -t "$SESSION:$WINDOW" C-c

# Wait a moment
sleep 2

# Kill the window
tmux kill-window -t "$SESSION:$WINDOW"

echo "✓ pear-git server stopped"
echo ""
echo "To restart:"
echo "  ./scripts/pear-git-start.sh"