Ocyss/srs-auth / .agents/skills/srs-develop
srs-develop
VerifiedDevelop, modify, debug, review, maintain, and explain the SRS and Oryx codebases and the SRS Docker image toolchain. Use for planned changes to the next-generation SRS Go proxy, SRS browser player, ossrs/dev-docker images, or Oryx Go backend, React dashboard, integrated runtime, packaging, installers, releases, and tests; bug maintenance; issue and pull-request triage; pull-request review; and Learn Code questions. The C++ SRS server is in maintenance mode, and planned Go origin and edge development is not yet supported. NOT for end-user support, usage questions, or configuration help — use srs-support for those.
scripts/oryx-stack-stop.sh
View on GitHub#!/bin/bash
# Stop the local development stack by its server sockets, even without PID
# state. These ports are reserved for this stack. Never stop Redis.
# TCP clients connected to these ports are NOT selected.
STATE_FILE="${ORYX_STACK_STATE_FILE:-/tmp/oryx-stack-state.env}"
if ! command -v lsof >/dev/null; then
echo "FAIL: lsof is required to discover and verify running services." >&2
exit 1
fi
stack_pids() {
local port pids status
for port in 3000 2022 2024 2443 1935 1985 8080; do
pids=$(lsof -nP -a -t -iTCP:"$port" -sTCP:LISTEN)
status=$?
# lsof returns 1 when there are no matching sockets.
if [[ "$status" -gt 1 ]]; then return "$status"; fi
printf '%s\n' "$pids"
done
for port in 8000 10080; do
pids=$(lsof -nP -a -t -iUDP:"$port")
status=$?
if [[ "$status" -gt 1 ]]; then return "$status"; fi
printf '%s\n' "$pids"
done
}
read_pids() {
local found
found=$(stack_pids) || return 1
PIDS=$(printf '%s\n' "$found" | awk '/^[0-9]+$/ && $1 > 1' | sort -un)
}
signal_stack() {
local pid
for pid in $PIDS; do
echo "Stopping stack listener $pid ($1)..."
kill "-$1" "$pid" 2>/dev/null || true
done
}
wait_stopped() {
local attempt
for attempt in 1 2 3 4 5; do
read_pids || return 1
[[ -z "$PIDS" ]] && return 0
sleep 1
done
read_pids || return 1
[[ -z "$PIDS" ]]
}
echo "=== Oryx Stack Stop ==="
read_pids || exit 1
signal_stack TERM
if ! wait_stopped; then
read_pids || exit 1
signal_stack KILL
if ! wait_stopped; then
echo "FAIL: stack ports are still occupied; check permissions or a service supervisor. Redis was not touched." >&2
exit 1
fi
fi
# Do not signal stale recorded PIDs: they may now belong to unrelated processes.
rm -f "$STATE_FILE" || exit 1
echo "Cleanup done. All local stack ports are clear. Redis is left running."
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |