Update Recyclarr
This commit is contained in:
parent
9676849fb1
commit
512286de02
1 changed files with 9 additions and 7 deletions
|
@ -9,8 +9,10 @@ source /config/extended/functions
|
||||||
#### Create Log File
|
#### Create Log File
|
||||||
logfileSetup
|
logfileSetup
|
||||||
|
|
||||||
|
logfile="/config/logs/$logFileName"
|
||||||
|
|
||||||
# Redirect all output to the log file
|
# Redirect all output to the log file
|
||||||
exec &> >(tee -a "/config/logs/$logFileName")
|
exec &> >(tee -a "$logfile")
|
||||||
|
|
||||||
#### Check Arr App
|
#### Check Arr App
|
||||||
getArrAppInfo
|
getArrAppInfo
|
||||||
|
@ -28,12 +30,12 @@ verifyConfig () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
RecyclarrProcess () {
|
RecyclarrProcess () {
|
||||||
# Configure Yaml with URL and API Key
|
# Configure Yaml with URL and API Key
|
||||||
sed -i "s%arrUrl%$arrUrl%g" "/config/extended/recyclarr.yaml"
|
sed -i "s%arrUrl%$arrUrl%g" "/config/extended/recyclarr.yaml"
|
||||||
sed -i "s%arrApi%$arrApiKey%g" "/config/extended/recyclarr.yaml"
|
sed -i "s%arrApi%$arrApiKey%g" "/config/extended/recyclarr.yaml"
|
||||||
|
|
||||||
# Update arr app
|
# update arr app
|
||||||
log "Updating Arr via Recyclarr"
|
log "Updating Arr via Recyclarr"
|
||||||
if [ ! -d /config/extended/recyclarr-data ]; then
|
if [ ! -d /config/extended/recyclarr-data ]; then
|
||||||
mkdir -p /config/extended/recyclarr-data
|
mkdir -p /config/extended/recyclarr-data
|
||||||
|
@ -41,9 +43,9 @@ RecyclarrProcess () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run Recyclarr and capture the output
|
# Run Recyclarr and capture the output
|
||||||
while IFS= read -r line; do
|
/recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data 2>&1 | tee -a "$logfile" | while IFS= read -r line; do
|
||||||
log "$line"
|
echo "$(date "+%F %T") :: $scriptName :: $scriptVersion :: $line"
|
||||||
done < <(/recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data 2>&1)
|
done >> "$logfile"
|
||||||
|
|
||||||
log "Complete"
|
log "Complete"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue