From c49a9414ad8490910f2a5170b5808d5205337687 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 12 Jul 2023 11:36:27 +0000 Subject: [PATCH] v1.3 - Make configurable --- universal/services/Recycalarr | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/universal/services/Recycalarr b/universal/services/Recycalarr index 1bc883d..3f40849 100644 --- a/universal/services/Recycalarr +++ b/universal/services/Recycalarr @@ -1,5 +1,20 @@ #!/usr/bin/env bash -scriptVersion="1.2" +scriptVersion="1.3" +scriptName="Recyclarr" + +#### Import Settings +source /config/extended.conf + +log () { + m_time=`date "+%F %T"` + echo $m_time" :: $scriptName :: $scriptVersion :: "$1 +} + +if [ "$enableRecyclarr" != "true" ]; then + log "Script is not enabled, enable by setting enableRecyclarr to \"true\" by modifying the \"/config/extended.conf\" config file..." + log "Sleeping (infinity)" + sleep infinity +fi getArrAppInfo () { # Get Arr App information @@ -42,12 +57,6 @@ verifyApiAccess () { fi done } - -log () { - m_time=`date "+%F %T"` - echo $m_time" :: Recycalarr :: $scriptVersion :: "$1 -} - RecyclarrProcess () { # auto-clean up log file to reduce space usage if [ -f "/config/logs/Recyclarr.txt" ]; then @@ -70,7 +79,7 @@ RecyclarrProcess () { mkdir -p /config/extended/recyclarr-data chmod 777 /config/extended/recyclarr-data fi - /recyclarr/recyclarr sync $recylcarrApp -c /config/extended/recyclarr.yaml --app-data /config/extended/recyclarr-data + /recyclarr/recyclarr sync $recylcarrApp -c $recyclarrConfig --app-data /config/extended/recyclarr-data log "Complete" }