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" }