From fb7d2a2b08bec90ea6496a601671d3a33e4596df Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 14 Jul 2023 19:12:34 -0400 Subject: [PATCH] v1.5 - User port instead of app name #17 --- universal/services/Recycalarr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/universal/services/Recycalarr b/universal/services/Recycalarr index b7f7647..beac0d8 100644 --- a/universal/services/Recycalarr +++ b/universal/services/Recycalarr @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.4" +scriptVersion="1.5" scriptName="Recyclarr" log () { @@ -47,22 +47,21 @@ getArrAppInfo () { arrPort="$(cat /config/config.xml | xq | jq -r .Config.Port)" arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}" fi - if [ "$arrName" == "Radarr" ]; then + if [ "$arrPort" == "7878" ]; then recylcarrApp="radarr" fi - if [ "$arrName" == "Sonarr" ]; then + if [ "$arrPort" == "8989" ]; then recylcarrApp="sonarr" fi } - verifyApiAccess () { until false do arrApiTest="" arrApiVersion="" - if [ "$arrName" == "Sonarr" ] || [ "$arrName" == "Radarr" ]; then + if [ "$arrPort" == "8989" ] || [ "$arrPort" == "7878" ]; then arrApiVersion="v3" - elif [ "$arrName" == "Lidarr" ] || [ "$arrName" == "Readarr" ]; then + elif [ "$arrPort" == "8686" ] || [ "$arrPort" == "8787" ]; then arrApiVersion="v1" fi arrApiTest=$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName) @@ -74,6 +73,7 @@ verifyApiAccess () { fi done } + RecyclarrProcess () { # Configure Yaml with URL and API Key sed -i "s%arrUrl%$arrUrl%g" "/config/extended/recyclarr.yaml"