claude-home/scripts/tdarr/stop-tdarr-gpu-podman.sh
Cal Corum ccdd7ee8b4 CLAUDE: Enhance Tdarr system with GPU transcoding optimization and automated maintenance
## Tdarr Plugin Stack Research & Configuration
- Research optimal H.265/HEVC plugin stacks for quality-focused transcoding
- Configure GPU threshold (95%) to prevent self-termination during transcoding
- Add Tdarr exception logic to distinguish transcoding from gaming GPU usage
- Update gaming detection to preserve active transcoding jobs

## Automated System Maintenance
- Add cron job for automatic cleanup of abandoned Tdarr temp directories
- Cleanup runs every 6 hours, preserves active jobs (< 6 hours old)
- Prevents /tmp filesystem bloat from interrupted transcoding jobs
- Safe cleanup only targets Tdarr-specific work directories

## Enhanced Documentation
- Add comprehensive Tdarr automation documentation in scripts/tdarr/README.md
- Document cleanup system and its relationship to main scheduler
- Update CLAUDE.md with Tdarr keyword triggers and context loading
- Add troubleshooting section for both scheduler and cleanup cron jobs

## System Architecture Improvements
- Organize Tdarr scripts under dedicated scripts/tdarr/ directory
- Maintain backwards compatibility with existing cron jobs
- Add gaming-aware scheduling with configurable time windows
- Implement robust GPU usage detection with Tdarr transcoding awareness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-09 22:06:24 -05:00

14 lines
368 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Stop Tdarr Node Script
set -e
CONTAINER_NAME="tdarr-node-gpu-unmapped"
echo "🛑 Stopping Tdarr Node: ${CONTAINER_NAME}"
if podman ps --format "{{.Names}}" | grep -q "^${CONTAINER_NAME}$"; then
podman stop "${CONTAINER_NAME}" 2>/dev/null || true
echo "✅ Tdarr Node stopped successfully"
else
echo " Tdarr Node was not running"
fi