Files
docker-rtorrent/install/rtorrent.sh
T
2025-08-01 16:16:57 -04:00

22 lines
408 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.
#!/usr/bin/env bash
set -e
CLEANUP_FILE="/home/nfs_download/rsession/rtorrent.lock"
# Remove stale lock at startup
if [ -f "$CLEANUP_FILE" ]; then
echo "️Stale lock file found. Removing..."
rm -f "$CLEANUP_FILE"
fi
cleanup() {
echo "Caught shutdown signal. Cleaning up..."
rm -f "$CLEANUP_FILE"
echo "Cleanup complete."
}
trap cleanup INT TERM EXIT
echo "Starting rtorrent..."
exec rtorrent