From a90ebb957bacc5da98159360e17bce11a70712d1 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 19 Aug 2022 13:56:23 -0400 Subject: [PATCH] Update and rename test to test.sh --- root/test | 1 - root/test.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) delete mode 100644 root/test create mode 100644 root/test.sh diff --git a/root/test b/root/test deleted file mode 100644 index 9daeafb..0000000 --- a/root/test +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/root/test.sh b/root/test.sh new file mode 100644 index 0000000..68fd267 --- /dev/null +++ b/root/test.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +scriptVersion="1.0.001" + +if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then + arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" + if [ "$arrUrlBase" = "null" ]; then + arrUrlBase="" + else + arrUrlBase="/$(echo "$arrUrlBase" | sed "s/\///g")" + fi + arrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)" + arrUrl="http://127.0.0.1:7878${arrUrlBase}" +fi + +# recyclarrURL="$(curl -s "https://github.com/recyclarr/recyclarr/releases" | grep "recyclarr-linux-x64.zip" | head -n 1 | grep -io '/dev/null + chmod u+rx /recyclarr/recyclarr +fi + +# update radarr +/recyclarr/recyclarr radarr -c /recyclarr.yaml --app-data /recylarr +exit