Files
ops-bridge/Makefile
tegwick 4e9882909f feat(maintenance): nightly stale SSH forward cleanup at 03:00
Add bridge maintenance cleanup to detect reverse tunnels whose remote
port is bound but no longer forwards (zombie sshd sessions), kill the
stale listeners on the remote host, and optionally restart the tunnel.

Includes install-cron/uninstall-cron/show-cron helpers and README notes
for the actcore-state-hub-bridge failure mode we hit on railiance01.
2026-06-19 15:59:27 +02:00

32 lines
1.1 KiB
Makefile

.DEFAULT_GOAL := help
.PHONY: help setup test lint install mcp-http mcp-stop cron-install-cron cron-uninstall-cron
help: ## List available make targets
@awk 'BEGIN {FS = ":.*## "}; /^[a-zA-Z0-9_.-]+:.*## / {printf " %-16s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
setup: ## Sync dependencies and install the bridge CLI wrapper
uv sync --all-groups
uv tool install -e . --force
test: ## Run the test suite
uv run pytest
lint: ## Run ruff lint checks
uv run ruff check .
install: ## Install the bridge CLI wrapper
uv tool install -e . --force
mcp-http: ## Start MCP server in SSE mode (default port 8002)
BRIDGE_MCP_PORT=$${BRIDGE_MCP_PORT:-8002} uv run python src/bridge/mcp_server/server.py --http
mcp-stop: ## Stop MCP server running on port 8002
@lsof -ti:$${BRIDGE_MCP_PORT:-8002} | xargs -r kill -TERM && echo "MCP server stopped" || echo "No MCP server running on port $${BRIDGE_MCP_PORT:-8002}"
cron-install-cron: ## Install 03:00 nightly stale-forward cleanup cron
bridge maintenance install-cron
cron-uninstall-cron: ## Remove nightly stale-forward cleanup cron
bridge maintenance uninstall-cron