|
#!/usr/bin/env bash |
|
RED="\033[31m" |
|
GREY="\033[90m" |
|
RESET="\033[0m" |
|
|
|
set -e |
|
set -a |
|
source .env |
|
set +a |
|
|
|
# Check if the script is being run as root |
|
if [ "$(id -u)" -ne 0 ]; then |
|
echo "This script must be run as root." |
|
exit 1 |
|
fi |
|
|
|
# Add apps user and group |
|
groupadd -g $PGID apps || groupadd apps || getent group apps |
|
useradd -u $PUID -g $PGID -m -s /bin/bash apps || getent passwd apps |
|
|
|
docker network create arr || : |
|
|
|
mkdir -p ${TV_PATH} ${MOVIES_PATH} ${DOWNLOADS_PATH} ${LEAVING_PATH} |
|
chown -R apps:apps ${TV_PATH} ${MOVIES_PATH} ${DOWNLOADS_PATH} ${LEAVING_PATH} |
|
mkdir -p ${CONFIG_PATH}/{emby,jellyseerr,janitorr,prowlarr,organizr,qbit,radarr,recyclarr,sonarr,unpackerr}/config |
|
chown -R apps:apps ${CONFIG_PATH}/{emby,jellyseerr,janitorr,prowlarr,organizr,qbit,radarr,recyclarr,sonarr,unpackerr} |
|
chmod -R 777 ${TV_PATH} ${MOVIES_PATH} ${DOWNLOADS_PATH} ${LEAVING_PATH} ${CONFIG_PATH} |
|
|
|
docker-compose up -d flaresolverr radarr sonarr prowlarr |
|
echo '..........' |
|
sleep 10 |
|
|
|
echo -e "[${RED}flaresolverr${RESET}](${GREY}http://localhost:8191${RESET})" |
|
echo -e "[${RED}prowlarr${RESET}](${GREY}http://localhost:9696${RESET})" |
|
echo -e "[${RED}radarr${RESET}](${GREY}http://localhost:7878${RESET})" |
|
echo -e "[${RED}sonarr${RESET}](${GREY}http://localhost:8989${RESET})" |
|
|
|
read -p "Have you configured these applications? (yes/no): " configured |
|
if [[ "$configured" == "yes" ]]; then |
|
echo "Both applications are configured." |
|
else |
|
exit 1 |
|
fi |
|
|
|
# Prowlarr API Key extract |
|
# Check if the configuration file exists |
|
if [ -f "$CONFIG_PATH/prowlarr/config.xml" ]; then |
|
# Extract the API key using grep and awk |
|
prowlarr_api_key=$(grep -oP '(?<=<ApiKey>).*?(?=</ApiKey>)' "$CONFIG_PATH/prowlarr/config.xml") |
|
|
|
if [ -n "$prowlarr_api_key" ]; then |
|
# Export the Prowlarr API key as a global variable |
|
export PROWLARR_API_KEY="$prowlarr_api_key" |
|
echo "Exported PROWLARR_API_KEY variable." |
|
else |
|
echo "API Key not found in the Prowlarr configuration file." |
|
fi |
|
else |
|
echo "Prowlarr configuration file not found." |
|
fi |
|
echo '..........' |
|
sleep 10 |
|
|
|
# Sonarr API Key extract |
|
# Check if the configuration file exists |
|
if [ -f "$CONFIG_PATH/sonarr/config.xml" ]; then |
|
# Extract the API key using grep and awk |
|
sonarr_api_key=$(grep -oP '(?<=<ApiKey>).*?(?=</ApiKey>)' "$CONFIG_PATH/sonarr/config.xml") |
|
|
|
if [ -n "$sonarr_api_key" ]; then |
|
# Export the Sonarr API key as a global variable |
|
export SONARR_API_KEY="$sonarr_api_key" |
|
echo "Exported SONARR_API_KEY=${SONARR_API_KEY} variable." |
|
else |
|
echo "Sonarr API Key not found in the configuration file." |
|
fi |
|
else |
|
echo "Sonarr configuration file not found." |
|
fi |
|
|
|
echo '.....' |
|
sleep 5 |
|
|
|
# Radarr API Key extract |
|
# Check if the configuration file exists |
|
if [ -f "$CONFIG_PATH/radarr/config.xml" ]; then |
|
# Extract the API key using grep and awk |
|
radarr_api_key=$(grep -oP '(?<=<ApiKey>).*?(?=</ApiKey>)' "$CONFIG_PATH/radarr/config.xml") |
|
|
|
if [ -n "$radarr_api_key" ]; then |
|
# Export the Radarr API key as a global variable |
|
export RADARR_API_KEY="$radarr_api_key" |
|
echo "Exported RADARR_API_KEY=${RADARR_API_KEY} variable." |
|
else |
|
echo "Radarr API Key not found in the configuration file." |
|
fi |
|
else |
|
echo "Radarr configuration file not found." |
|
fi |
|
|
|
# Set the root folder for Sonarr |
|
curl "http://localhost:8989/api/v3/rootFolder" -X POST -H "Accept: application/json" -H "Content-Type: application/json" \ |
|
-H "X-Api-Key: $SONARR_API_KEY" --data-raw "{\"path\":\"$TV_PATH\"}" |
|
|
|
# Set the root folder for Radarr |
|
curl "http://localhost:7878/api/v3/rootFolder" -X POST -H "Accept: application/json" -H "Content-Type: application/json" \ |
|
-H "X-Api-Key: $RADARR_API_KEY" --data-raw "{\"path\":\"$MOVIES_PATH\"}" |
|
|
|
# Add Sonarr to Prowlarr |
|
|
|
curl "http://localhost:9696/api/v1/applications" -X POST -H "Accept: application/json" -H "Content-Type: application/json" \ |
|
-H "X-Api-Key: $PROWLARR_API_KEY" \ |
|
--data-raw ' |
|
{"syncLevel":"fullSync","name":"Sonarr","fields":[{"name":"prowlarrUrl","value":"http://prowlarr:9696"},{"name":"baseUrl","value":"http://sonarr:8989"},{"name":"apiKey","value":"'$SONARR_API_KEY'"},{"name":"syncCategories","value":[5000,5010,5020,5030,5040,5045,5050,5090]},{"name":"animeSyncCategories","value":[5070]},{"name":"syncAnimeStandardFormatSearch","value":false}],"implementationName":"Sonarr","implementation":"Sonarr","configContract":"SonarrSettings","infoLink":"https://wiki.servarr.com/prowlarr/supported#sonarr","tags":[]}' |
|
|
|
curl "http://localhost:9696/api/v1/applications" -X POST -H "Accept: application/json" -H "Content-Type: application/json" \ |
|
-H "X-Api-Key: $PROWLARR_API_KEY" --data-raw ' |
|
{"syncLevel":"fullSync","name":"Radarr","fields":[{"name":"prowlarrUrl","value":"http://prowlarr:9696"},{"name":"baseUrl","value":"http://radarr:7878"},{"name":"apiKey","value":"'$RADARR_API_KEY'"},{"name":"syncCategories","value":[2000,2010,2020,2030,2040,2045,2050,2060,2070,2080,2090]}],"implementationName":"Radarr","implementation":"Radarr","configContract":"RadarrSettings","infoLink":"https://wiki.servarr.com/prowlarr/supported#radarr","tags":[]}' |
|
|
|
#clean up radarr profiles |
|
|
|
# curl "http://localhost:7878/api/v3/qualityprofile/1" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" |
|
# curl "http://localhost:7878/api/v3/qualityprofile/6" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" |
|
# curl "http://localhost:7878/api/v3/qualityprofile/3" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" |
|
# curl "http://localhost:7878/api/v3/qualityprofile/2" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" |
|
|
|
# curl "http://localhost:7878/api/v3/qualityprofile/4" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" \ |
|
# --data-raw '{{"name":"HD-1080p","upgradeAllowed":true,"cutoff":7,"items":[{"quality":{"id":0,"name":"Unknown","source":"unknown","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":24,"name":"WORKPRINT","source":"workprint","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":25,"name":"CAM","source":"cam","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":26,"name":"TELESYNC","source":"telesync","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":27,"name":"TELECINE","source":"telecine","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":29,"name":"REGIONAL","source":"dvd","resolution":480,"modifier":"regional"},"items":[],"allowed":false},{"quality":{"id":28,"name":"DVDSCR","source":"dvd","resolution":480,"modifier":"screener"},"items":[],"allowed":false},{"quality":{"id":1,"name":"SDTV","source":"tv","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":2,"name":"DVD","source":"dvd","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":23,"name":"DVD-R","source":"dvd","resolution":480,"modifier":"remux"},"items":[],"allowed":false},{"name":"WEB 480p","items":[{"quality":{"id":8,"name":"WEBDL-480p","source":"webdl","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":12,"name":"WEBRip-480p","source":"webrip","resolution":480,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1000},{"quality":{"id":20,"name":"Bluray-480p","source":"bluray","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":21,"name":"Bluray-576p","source":"bluray","resolution":576,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":4,"name":"HDTV-720p","source":"tv","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"name":"WEB 720p","items":[{"quality":{"id":5,"name":"WEBDL-720p","source":"webdl","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":14,"name":"WEBRip-720p","source":"webrip","resolution":720,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1001},{"quality":{"id":6,"name":"Bluray-720p","source":"bluray","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":9,"name":"HDTV-1080p","source":"tv","resolution":1080,"modifier":"none"},"items":[],"allowed":true},{"name":"WEB 1080p","items":[{"quality":{"id":3,"name":"WEBDL-1080p","source":"webdl","resolution":1080,"modifier":"none"},"items":[],"allowed":true},{"quality":{"id":15,"name":"WEBRip-1080p","source":"webrip","resolution":1080,"modifier":"none"},"items":[],"allowed":true}],"allowed":true,"id":1002},{"quality":{"id":7,"name":"Bluray-1080p","source":"bluray","resolution":1080,"modifier":"none"},"items":[],"allowed":true},{"quality":{"id":30,"name":"Remux-1080p","source":"bluray","resolution":1080,"modifier":"remux"},"items":[],"allowed":false},{"quality":{"id":16,"name":"HDTV-2160p","source":"tv","resolution":2160,"modifier":"none"},"items":[],"allowed":false},{"name":"WEB 2160p","items":[{"quality":{"id":18,"name":"WEBDL-2160p","source":"webdl","resolution":2160,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":17,"name":"WEBRip-2160p","source":"webrip","resolution":2160,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1003},{"quality":{"id":19,"name":"Bluray-2160p","source":"bluray","resolution":2160,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":31,"name":"Remux-2160p","source":"bluray","resolution":2160,"modifier":"remux"},"items":[],"allowed":false},{"quality":{"id":22,"name":"BR-DISK","source":"bluray","resolution":1080,"modifier":"brdisk"},"items":[],"allowed":false},{"quality":{"id":10,"name":"Raw-HD","source":"tv","resolution":1080,"modifier":"rawhd"},"items":[],"allowed":false}],"minFormatScore":0,"cutoffFormatScore":0,"formatItems":[],"language":{"id":1,"name":"English"},"id":4} |
|
# }' |
|
# curl "http://localhost:7878/api/v3/qualityprofile/5" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" \ |
|
# --data-raw '{{"name":"Ultra-HD","upgradeAllowed":true,"cutoff":19,"items":[{"quality":{"id":0,"name":"Unknown","source":"unknown","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":24,"name":"WORKPRINT","source":"workprint","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":25,"name":"CAM","source":"cam","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":26,"name":"TELESYNC","source":"telesync","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":27,"name":"TELECINE","source":"telecine","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":29,"name":"REGIONAL","source":"dvd","resolution":480,"modifier":"regional"},"items":[],"allowed":false},{"quality":{"id":28,"name":"DVDSCR","source":"dvd","resolution":480,"modifier":"screener"},"items":[],"allowed":false},{"quality":{"id":1,"name":"SDTV","source":"tv","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":2,"name":"DVD","source":"dvd","resolution":0,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":23,"name":"DVD-R","source":"dvd","resolution":480,"modifier":"remux"},"items":[],"allowed":false},{"name":"WEB 480p","items":[{"quality":{"id":8,"name":"WEBDL-480p","source":"webdl","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":12,"name":"WEBRip-480p","source":"webrip","resolution":480,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1000},{"quality":{"id":20,"name":"Bluray-480p","source":"bluray","resolution":480,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":21,"name":"Bluray-576p","source":"bluray","resolution":576,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":4,"name":"HDTV-720p","source":"tv","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"name":"WEB 720p","items":[{"quality":{"id":5,"name":"WEBDL-720p","source":"webdl","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":14,"name":"WEBRip-720p","source":"webrip","resolution":720,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1001},{"quality":{"id":6,"name":"Bluray-720p","source":"bluray","resolution":720,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":9,"name":"HDTV-1080p","source":"tv","resolution":1080,"modifier":"none"},"items":[],"allowed":false},{"name":"WEB 1080p","items":[{"quality":{"id":3,"name":"WEBDL-1080p","source":"webdl","resolution":1080,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":15,"name":"WEBRip-1080p","source":"webrip","resolution":1080,"modifier":"none"},"items":[],"allowed":false}],"allowed":false,"id":1002},{"quality":{"id":7,"name":"Bluray-1080p","source":"bluray","resolution":1080,"modifier":"none"},"items":[],"allowed":false},{"quality":{"id":30,"name":"Remux-1080p","source":"bluray","resolution":1080,"modifier":"remux"},"items":[],"allowed":false},{"quality":{"id":16,"name":"HDTV-2160p","source":"tv","resolution":2160,"modifier":"none"},"items":[],"allowed":true},{"name":"WEB 2160p","items":[{"quality":{"id":18,"name":"WEBDL-2160p","source":"webdl","resolution":2160,"modifier":"none"},"items":[],"allowed":true},{"quality":{"id":17,"name":"WEBRip-2160p","source":"webrip","resolution":2160,"modifier":"none"},"items":[],"allowed":true}],"allowed":true,"id":1003},{"quality":{"id":19,"name":"Bluray-2160p","source":"bluray","resolution":2160,"modifier":"none"},"items":[],"allowed":true},{"quality":{"id":31,"name":"Remux-2160p","source":"bluray","resolution":2160,"modifier":"remux"},"items":[],"allowed":false},{"quality":{"id":22,"name":"BR-DISK","source":"bluray","resolution":1080,"modifier":"brdisk"},"items":[],"allowed":false},{"quality":{"id":10,"name":"Raw-HD","source":"tv","resolution":1080,"modifier":"rawhd"},"items":[],"allowed":false}],"minFormatScore":0,"cutoffFormatScore":0,"formatItems":[],"language":{"id":1,"name":"English"},"id":5} |
|
# }' |
|
|
|
#clean up sonarr profiles |
|
|
|
# curl "http://localhost:8989/api/v3/qualityprofile/1" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" |
|
# curl "http://localhost:8989/api/v3/qualityprofile/6" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" |
|
# curl "http://localhost:8989/api/v3/qualityprofile/3" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" |
|
# curl "http://localhost:8989/api/v3/qualityprofile/2" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" |
|
# |
|
# curl "http://localhost:8989/api/v3/qualityprofile/4" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" \ |
|
# --data-raw '{"name":"HD-1080p","upgradeAllowed":true,"cutoff":7,"items":[{"quality":{"id":0,"name":"Unknown","source":"unknown","resolution":0},"items":[],"allowed":false},{"quality":{"id":1,"name":"SDTV","source":"television","resolution":480},"items":[],"allowed":false},{"name":"WEB 480p","items":[{"quality":{"id":12,"name":"WEBRip-480p","source":"webRip","resolution":480},"items":[],"allowed":false},{"quality":{"id":8,"name":"WEBDL-480p","source":"web","resolution":480},"items":[],"allowed":false}],"allowed":false,"id":1000},{"quality":{"id":2,"name":"DVD","source":"dvd","resolution":480},"items":[],"allowed":false},{"quality":{"id":13,"name":"Bluray-480p","source":"bluray","resolution":480},"items":[],"allowed":false},{"quality":{"id":4,"name":"HDTV-720p","source":"television","resolution":720},"items":[],"allowed":false},{"quality":{"id":9,"name":"HDTV-1080p","source":"television","resolution":1080},"items":[],"allowed":true},{"quality":{"id":10,"name":"Raw-HD","source":"televisionRaw","resolution":1080},"items":[],"allowed":false},{"name":"WEB 720p","items":[{"quality":{"id":14,"name":"WEBRip-720p","source":"webRip","resolution":720},"items":[],"allowed":false},{"quality":{"id":5,"name":"WEBDL-720p","source":"web","resolution":720},"items":[],"allowed":false}],"allowed":false,"id":1001},{"quality":{"id":6,"name":"Bluray-720p","source":"bluray","resolution":720},"items":[],"allowed":false},{"name":"WEB 1080p","items":[{"quality":{"id":15,"name":"WEBRip-1080p","source":"webRip","resolution":1080},"items":[],"allowed":true},{"quality":{"id":3,"name":"WEBDL-1080p","source":"web","resolution":1080},"items":[],"allowed":true}],"allowed":true,"id":1002},{"quality":{"id":7,"name":"Bluray-1080p","source":"bluray","resolution":1080},"items":[],"allowed":true},{"quality":{"id":20,"name":"Bluray-1080p Remux","source":"blurayRaw","resolution":1080},"items":[],"allowed":false},{"quality":{"id":16,"name":"HDTV-2160p","source":"television","resolution":2160},"items":[],"allowed":false},{"name":"WEB 2160p","items":[{"quality":{"id":17,"name":"WEBRip-2160p","source":"webRip","resolution":2160},"items":[],"allowed":false},{"quality":{"id":18,"name":"WEBDL-2160p","source":"web","resolution":2160},"items":[],"allowed":false}],"allowed":false,"id":1003},{"quality":{"id":19,"name":"Bluray-2160p","source":"bluray","resolution":2160},"items":[],"allowed":false},{"quality":{"id":21,"name":"Bluray-2160p Remux","source":"blurayRaw","resolution":2160},"items":[],"allowed":false}],"id":4}' |
|
# curl "http://localhost:8989/api/v3/qualityprofile/5" -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" \ |
|
# --data-raw '{"name":"HD-1080p","upgradeAllowed":true,"cutoff":7,"items":[{"quality":{"id":0,"name":"Unknown","source":"unknown","resolution":0},"items":[],"allowed":false},{"quality":{"id":1,"name":"SDTV","source":"television","resolution":480},"items":[],"allowed":false},{"name":"WEB 480p","items":[{"quality":{"id":12,"name":"WEBRip-480p","source":"webRip","resolution":480},"items":[],"allowed":false},{"quality":{"id":8,"name":"WEBDL-480p","source":"web","resolution":480},"items":[],"allowed":false}],"allowed":false,"id":1000},{"quality":{"id":2,"name":"DVD","source":"dvd","resolution":480},"items":[],"allowed":false},{"quality":{"id":13,"name":"Bluray-480p","source":"bluray","resolution":480},"items":[],"allowed":false},{"quality":{"id":4,"name":"HDTV-720p","source":"television","resolution":720},"items":[],"allowed":false},{"quality":{"id":9,"name":"HDTV-1080p","source":"television","resolution":1080},"items":[],"allowed":true},{"quality":{"id":10,"name":"Raw-HD","source":"televisionRaw","resolution":1080},"items":[],"allowed":false},{"name":"WEB 720p","items":[{"quality":{"id":14,"name":"WEBRip-720p","source":"webRip","resolution":720},"items":[],"allowed":false},{"quality":{"id":5,"name":"WEBDL-720p","source":"web","resolution":720},"items":[],"allowed":false}],"allowed":false,"id":1001},{"quality":{"id":6,"name":"Bluray-720p","source":"bluray","resolution":720},"items":[],"allowed":false},{"name":"WEB 1080p","items":[{"quality":{"id":15,"name":"WEBRip-1080p","source":"webRip","resolution":1080},"items":[],"allowed":true},{"quality":{"id":3,"name":"WEBDL-1080p","source":"web","resolution":1080},"items":[],"allowed":true}],"allowed":true,"id":1002},{"quality":{"id":7,"name":"Bluray-1080p","source":"bluray","resolution":1080},"items":[],"allowed":true},{"quality":{"id":20,"name":"Bluray-1080p Remux","source":"blurayRaw","resolution":1080},"items":[],"allowed":false},{"quality":{"id":16,"name":"HDTV-2160p","source":"television","resolution":2160},"items":[],"allowed":false},{"name":"WEB 2160p","items":[{"quality":{"id":17,"name":"WEBRip-2160p","source":"webRip","resolution":2160},"items":[],"allowed":false},{"quality":{"id":18,"name":"WEBDL-2160p","source":"web","resolution":2160},"items":[],"allowed":false}],"allowed":false,"id":1003},{"quality":{"id":19,"name":"Bluray-2160p","source":"bluray","resolution":2160},"items":[],"allowed":false},{"quality":{"id":21,"name":"Bluray-2160p Remux","source":"blurayRaw","resolution":2160},"items":[],"allowed":false}],"id":4}' |
|
|
|
# Setup FlareSolverr for Prowlarr |
|
curl 'http://localhost:9696/api/v1/tag' -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H "X-Api-Key: ${PROWLARR_API_KEY}" --data-raw '{"label":"FlareSolverr"}' |
|
curl 'http://localhost:9696/api/v1/indexerProxy/1' -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H "X-Api-Key: ${PROWLARR_API_KEY}" --data-raw '{"onHealthIssue":false,"supportsOnHealthIssue":false,"includeHealthWarnings":false,"name":"FlareSolverr","fields":[{"name":"host","value":"http://flaresolverr:8191/"},{"name":"requestTimeout","value":60}],"implementationName":"FlareSolverr","implementation":"FlareSolverr","configContract":"FlareSolverrSettings","infoLink":"https://wiki.servarr.com/prowlarr/supported#flaresolverr","tags":[1],"id":1}' |
|
|
|
#Update Qbit config |
|
envsubst <./qBittorrent.conf >"$CONFIG_PATH/qbit/config/qBittorrent.conf" |
|
docker-compose up -d qbittorrent |
|
echo '...' |
|
sleep 3 |
|
|
|
echo -e "[${RED}qbittorrent${RESET}](${GREY}http://localhost:8080${RESET})" |
|
|
|
echo '...' |
|
sleep 3 |
|
docker-compose up -d emby jellyseerr |
|
# Add qBittorrent as a download client to Sonarr |
|
|
|
curl "http://localhost:8989/api/v3/downloadclient" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $SONARR_API_KEY" \ |
|
--data-raw ' |
|
{"enable":true,"protocol":"torrent","priority":1,"removeCompletedDownloads":true,"removeFailedDownloads":true,"name":"qbittorrent","fields":[{"name":"host","value":"qbittorrent"},{"name":"port","value":8080},{"name":"useSsl","value":false},{"name":"urlBase"},{"name":"username","value":"admin"},{"name":"password","value":"adminadmin"},{"name":"tvCategory","value":"tv-sonarr"},{"name":"tvImportedCategory"},{"name":"recentTvPriority","value":0},{"name":"olderTvPriority","value":0},{"name":"initialState","value":0},{"name":"sequentialOrder","value":false},{"name":"firstAndLast","value":false}],"implementationName":"qBittorrent","implementation":"QBittorrent","configContract":"QBittorrentSettings","infoLink":"https://wiki.servarr.com/sonarr/supported#qbittorrent","tags":[]}' |
|
|
|
# Add qBittorrent as a download client to Radarr |
|
|
|
curl "http://localhost:7878/api/v3/downloadclient" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $RADARR_API_KEY" \ |
|
--data-raw ' |
|
{"enable":true,"protocol":"torrent","priority":1,"removeCompletedDownloads":true,"removeFailedDownloads":true,"name":"qbittorrent","fields":[{"name":"host","value":"qbittorrent"},{"name":"port","value":8080},{"name":"useSsl","value":false},{"name":"urlBase"},{"name":"username","value":"admin"},{"name":"password","value":"adminadmin"},{"name":"movieCategory","value":"radarr"},{"name":"movieImportedCategory"},{"name":"recentMoviePriority","value":0},{"name":"olderMoviePriority","value":0},{"name":"initialState","value":0},{"name":"sequentialOrder","value":false},{"name":"firstAndLast","value":false}],"implementationName":"qBittorrent","implementation":"QBittorrent","configContract":"QBittorrentSettings","infoLink":"https://wiki.servarr.com/radarr/supported#qbittorrent","tags":[]}' |
|
|
|
# Add qBittorrent as a download client to Prowlarr |
|
|
|
curl "http://localhost:9696/api/v1/downloadclient" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $PROWLARR_API_KEY" \ |
|
--data-raw ' |
|
{"enable":true,"protocol":"torrent","priority":1,"categories":[],"supportsCategories":true,"name":"QBittorrent","fields":[{"name":"host","value":"qbittorrent"},{"name":"port","value":8080},{"name":"useSsl","value":false},{"name":"urlBase"},{"name":"username","value":"admin"},{"name":"password","value":"adminadmin"},{"name":"category","value":"prowlarr"},{"name":"priority","value":0},{"name":"initialState","value":0},{"name":"sequentialOrder","value":false},{"name":"firstAndLast","value":false}],"implementationName":"qBittorrent","implementation":"QBittorrent","configContract":"QBittorrentSettings","infoLink":"https://wiki.servarr.com/prowlarr/supported#qbittorrent","tags":[]}' |
|
|
|
#configure unpackerr |
|
|
|
envsubst <./unpackerr.conf >"${CONFIG_PATH}/unpackerr/unpackerr.conf" |
|
docker-compose up -d unpackerr |
|
|
|
envsubst <./recyclarr.yml >$CONFIG_PATH/recyclarr/recyclarr.yml |
|
docker-compose up -d recyclarr |
|
|
|
echo '.' |
|
sleep 1 |
|
docker-compose exec recyclarr recyclarr sync radarr |
|
echo '.....' |
|
sleep 5 |
|
docker-compose exec recyclarr recyclarr sync sonarr |
|
echo '.....' |
|
sleep 5 |
|
|
|
envsubst <./janitorr.yml >$CONFIG_PATH/janitorr/config/application.yml |
|
docker-compose up -d janitorr |
|
|
|
docker-compose up -d watchtower |
|
echo -e "[${RED}emby${RESET}](${GREY}http://localhost:8096${RESET})" |
|
echo -e "[${RED}jellyseerr${RESET}](${GREY}http://localhost:5055${RESET})" |
|
|
|
envsubst <./arr-app.service | tee /etc/systemd/system/arr-app.service |
|
systemctl daemon-reload |
|
systemctl enable --now arr-app.service |
|
|
|
echo -e "..... \e[32mDone\e[0m ....." |