🎬 ARR Suite Template Bootstrap - Complete Media Automation Stack Features: - 16 production services (Prowlarr, Sonarr, Radarr, Plex, etc.) - One-command Ansible deployment - VPN-protected downloads via Gluetun - Tailscale secure access - Production-ready security (UFW, Fail2Ban) - Automated backups and monitoring - Comprehensive documentation Ready for customization and deployment to any VPS. Co-authored-by: openhands <openhands@all-hands.dev>
51 lines
1.9 KiB
Django/Jinja
51 lines
1.9 KiB
Django/Jinja
#!/bin/bash
|
|
# Configure Download Clients for *arr Services
|
|
|
|
echo "🔧 Configuring Download Clients..."
|
|
|
|
# Get service name from hostname
|
|
SERVICE=$(hostname)
|
|
|
|
# Configure SABnzbd
|
|
curl -X POST "http://localhost:$(cat /proc/1/environ | tr '\0' '\n' | grep PORT | cut -d'=' -f2)/api/v3/downloadclient" \
|
|
-H "X-Api-Key: $(cat /config/config.xml | grep -o '<ApiKey>[^<]*</ApiKey>' | sed 's/<[^>]*>//g')" \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{
|
|
"enable": true,
|
|
"name": "SABnzbd",
|
|
"implementation": "Sabnzbd",
|
|
"configContract": "SabnzbdSettings",
|
|
"fields": [
|
|
{"name": "host", "value": "gluetun"},
|
|
{"name": "port", "value": 8081},
|
|
{"name": "apiKey", "value": "{{ api_keys.sabnzbd }}"},
|
|
{"name": "username", "value": ""},
|
|
{"name": "password", "value": ""},
|
|
{"name": "tvCategory", "value": "tv"},
|
|
{"name": "recentTvPriority", "value": 0},
|
|
{"name": "olderTvPriority", "value": 0},
|
|
{"name": "useSsl", "value": false}
|
|
]
|
|
}' 2>/dev/null || echo "SABnzbd configuration failed or already exists"
|
|
|
|
# Configure Deluge
|
|
curl -X POST "http://localhost:$(cat /proc/1/environ | tr '\0' '\n' | grep PORT | cut -d'=' -f2)/api/v3/downloadclient" \
|
|
-H "X-Api-Key: $(cat /config/config.xml | grep -o '<ApiKey>[^<]*</ApiKey>' | sed 's/<[^>]*>//g')" \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{
|
|
"enable": true,
|
|
"name": "Deluge",
|
|
"implementation": "Deluge",
|
|
"configContract": "DelugeSettings",
|
|
"fields": [
|
|
{"name": "host", "value": "gluetun"},
|
|
{"name": "port", "value": 8112},
|
|
{"name": "password", "value": "deluge"},
|
|
{"name": "tvCategory", "value": "tv"},
|
|
{"name": "recentTvPriority", "value": 0},
|
|
{"name": "olderTvPriority", "value": 0},
|
|
{"name": "useSsl", "value": false}
|
|
]
|
|
}' 2>/dev/null || echo "Deluge configuration failed or already exists"
|
|
|
|
echo "✅ Download clients configuration complete for $SERVICE!" |