Auto-setup Prowlarr with Lidarr, Radarr or Sonarr (#262)

Co-authored-by: Steven Briscoe <me@stevenbriscoe.com>
This commit is contained in:
Steven Briscoe 2022-11-10 12:49:20 +10:00 committed by GitHub
parent 39bdd2e73f
commit 4a5341c75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 95 additions and 10 deletions

24
lidarr/hooks/post-install Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
if "${UMBREL_ROOT}/scripts/app" ls-installed | grep --quiet 'prowlarr'
then
CONFIG_FILE="${APP_DATA_DIR}/data/config/config.xml"
# Wait for the config.xml file to exist
# Wait for the API key property (<ApiKey>) to exist in the config file
for attempt in $(seq 1 20); do
if [[ -f "${CONFIG_FILE}" ]] && cat "${CONFIG_FILE}" | grep --quiet '<ApiKey>'; then
echo "config.xml file exists and <ApiKey> xml key exists..."
# Restart Prowlarr to automatically set this up as an app
"${UMBREL_ROOT}/scripts/app" restart prowlarr
exit
fi
sleep 1
done
>&2 echo "Error: Failed to locate <ApiKey> inside: ${CONFIG_FILE}"
exit 1
fi

View File

@ -1,4 +1,4 @@
manifestVersion: 1
manifestVersion: 1.1
id: lidarr
category: Media
name: Lidarr

View File

@ -21,12 +21,19 @@ services:
ipv4_address: $APP_PROWLARR_IP
mac:
image: getumbrel/media-app-configurator:v1.0.0@sha256:e3d8b18e0186f76dd3f3d4acacc9101b4abbf302d8f2afbb47cdd3879b1a1008
image: getumbrel/media-app-configurator:v1.1.0@sha256:987f6a02367adf86ab1cff38e1e2d43d85e17a6fc130aae4af196fb571dff06a
user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/config:/config
environment:
DOWNLOAD_CLIENT_API_URL: "http://${APP_PROWLARR_IP}:${APP_PROWLARR_PORT}/api/v1/downloadclient"
APP_ID: "prowlarr"
APP_URL: "http://prowlarr_server_1:9696"
TRANSMISSION_HOST: "transmission_server_1"
TRANSMISSION_PORT: 9091
RADARR_URL: "http://radarr_server_1:7878"
RADARR_CONFIG_XML: "${APP_PROWLARR_RADARR_CONFIG_XML}"
LIDARR_URL: "http://lidarr_server_1:8686"
LIDARR_CONFIG_XML: "${APP_PROWLARR_LIDARR_CONFIG_XML}"
SONARR_URL: "http://sonarr_server_1:8989"
SONARR_CONFIG_XML: "${APP_PROWLARR_SONARR_CONFIG_XML}"

View File

@ -1,2 +1,6 @@
export APP_PROWLARR_IP="10.21.25.8"
export APP_PROWLARR_PORT=9696
export APP_PROWLARR_PORT=9696
export APP_PROWLARR_RADARR_CONFIG_XML=$(cat "${UMBREL_ROOT}/app-data/radarr/data/config/config.xml" 2>/dev/null || echo "")
export APP_PROWLARR_LIDARR_CONFIG_XML=$(cat "${UMBREL_ROOT}/app-data/lidarr/data/config/config.xml" 2>/dev/null || echo "")
export APP_PROWLARR_SONARR_CONFIG_XML=$(cat "${UMBREL_ROOT}/app-data/sonarr/data/config/config.xml" 2>/dev/null || echo "")

View File

@ -2,13 +2,14 @@ manifestVersion: 1
id: prowlarr
category: Media
name: Prowlarr
version: "0.4.4-nightly"
version: "0.4.4-nightly-build-2"
tagline: Prowlarr is an indexer manager/proxy
description: >-
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports management of both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Lidarr, Mylar3, Radarr, Readarr, and Sonarr offering complete management of your indexers with no per app Indexer setup required (we do it all).
developer: Prowlarr
website: https://prowlarr.com/
dependencies: []
dependencies:
- transmission
repo: https://github.com/Prowlarr/Prowlarr
support: https://github.com/Prowlarr/Prowlarr/issues
port: 9696
@ -19,8 +20,9 @@ gallery:
path: ""
defaultUsername: ""
defaultPassword: ""
releaseNotes: >-
On installation of Sonarr, Lidarr or Radarr, Prowlarr will now automatically setup the app's connection within its settings
torOnly: false
permissions:
- STORAGE_DOWNLOADS
submitter: Umbrel
- STORAGE_DOWNLOADSsubmitter: Umbrel
submission: https://github.com/getumbrel/umbrel-apps/commit/60878f278d544b204d8e7c96240c797f43a9b319

24
radarr/hooks/post-install Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
if "${UMBREL_ROOT}/scripts/app" ls-installed | grep --quiet 'prowlarr'
then
CONFIG_FILE="${APP_DATA_DIR}/data/config/config.xml"
# Wait for the config.xml file to exist
# Wait for the API key property (<ApiKey>) to exist in the config file
for attempt in $(seq 1 20); do
if [[ -f "${CONFIG_FILE}" ]] && cat "${CONFIG_FILE}" | grep --quiet '<ApiKey>'; then
echo "config.xml file exists and <ApiKey> xml key exists..."
# Restart Prowlarr to automatically set this up as an app
"${UMBREL_ROOT}/scripts/app" restart prowlarr
exit
fi
sleep 1
done
>&2 echo "Error: Failed to locate <ApiKey> inside: ${CONFIG_FILE}"
exit 1
fi

View File

@ -1,4 +1,4 @@
manifestVersion: 1
manifestVersion: 1.1
id: radarr
category: Media
name: Radarr

24
sonarr/hooks/post-install Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
if "${UMBREL_ROOT}/scripts/app" ls-installed | grep --quiet 'prowlarr'
then
CONFIG_FILE="${APP_DATA_DIR}/data/config/config.xml"
# Wait for the config.xml file to exist
# Wait for the API key property (<ApiKey>) to exist in the config file
for attempt in $(seq 1 20); do
if [[ -f "${CONFIG_FILE}" ]] && cat "${CONFIG_FILE}" | grep --quiet '<ApiKey>'; then
echo "config.xml file exists and <ApiKey> xml key exists..."
# Restart Prowlarr to automatically set this up as an app
"${UMBREL_ROOT}/scripts/app" restart prowlarr
exit
fi
sleep 1
done
>&2 echo "Error: Failed to locate <ApiKey> inside: ${CONFIG_FILE}"
exit 1
fi

View File

@ -1,4 +1,4 @@
manifestVersion: 1
manifestVersion: 1.1
id: sonarr
category: Media
name: Sonarr