v1.3 - Make configurable

This commit is contained in:
RandomNinjaAtk 2023-07-12 11:36:27 +00:00 committed by GitHub
parent 026cbb3da5
commit c49a9414ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,20 @@
#!/usr/bin/env bash #!/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 () { getArrAppInfo () {
# Get Arr App information # Get Arr App information
@ -42,12 +57,6 @@ verifyApiAccess () {
fi fi
done done
} }
log () {
m_time=`date "+%F %T"`
echo $m_time" :: Recycalarr :: $scriptVersion :: "$1
}
RecyclarrProcess () { RecyclarrProcess () {
# auto-clean up log file to reduce space usage # auto-clean up log file to reduce space usage
if [ -f "/config/logs/Recyclarr.txt" ]; then if [ -f "/config/logs/Recyclarr.txt" ]; then
@ -70,7 +79,7 @@ RecyclarrProcess () {
mkdir -p /config/extended/recyclarr-data mkdir -p /config/extended/recyclarr-data
chmod 777 /config/extended/recyclarr-data chmod 777 /config/extended/recyclarr-data
fi 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" log "Complete"
} }