obs-r2-uploader/streaming/stop-streaming.sh

38 lines
806 B
Bash
Executable File

#!/bin/bash
# Stop the streaming stack
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
echo "=========================================="
echo "Stopping OBS Live Streaming Stack"
echo "=========================================="
echo ""
# Stop HLS uploader
if [ -f "hls-uploader.pid" ]; then
PID=$(cat hls-uploader.pid)
if kill -0 $PID 2>/dev/null; then
echo "Stopping HLS uploader (PID: $PID)..."
kill $PID
rm hls-uploader.pid
echo "✓ HLS uploader stopped"
else
echo "HLS uploader not running"
rm hls-uploader.pid
fi
else
echo "No HLS uploader PID file found"
fi
echo ""
# Stop nginx-rtmp
echo "Stopping nginx-rtmp server..."
docker-compose down
echo ""
echo "✓ Streaming stack stopped"
echo ""