File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ source /config/extended/functions
99# ### Create Log File
1010logfileSetup
1111
12+ logfile=" /config/logs/$logFileName "
13+
1214# Redirect all output to the log file
13- exec & > >( tee -a " /config/logs/ $logFileName " )
15+ exec & > >( tee -a " $logfile " )
1416
1517# ### Check Arr App
1618getArrAppInfo
@@ -28,22 +30,22 @@ verifyConfig () {
2830 fi
2931}
3032
31- RecyclarrProcess () {
33+ RecyclarrProcess () {
3234 # Configure Yaml with URL and API Key
3335 sed -i " s%arrUrl%$arrUrl %g" " /config/extended/recyclarr.yaml"
34- sed -i " s%arrApi%$arrApiKey %g" " /config/extended/recyclarr.yaml"
36+ sed -i " s%arrApi%$arrApiKey %g" " /config/extended/recyclarr.yaml"
3537
36- # Update arr app
38+ # update arr app
3739 log " Updating Arr via Recyclarr"
3840 if [ ! -d /config/extended/recyclarr-data ]; then
3941 mkdir -p /config/extended/recyclarr-data
4042 chmod 777 /config/extended/recyclarr-data
4143 fi
4244
4345 # Run Recyclarr and capture the output
44- while IFS= read -r line; do
45- log " $line "
46- done < <( /recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data 2>&1 )
46+ /recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data 2>&1 | tee -a " $logfile " | while IFS= read -r line; do
47+ echo " $( date " +%F %T " ) :: $scriptName :: $scriptVersion :: $line "
48+ done >> " $logfile "
4749
4850 log " Complete"
4951}
You can’t perform that action at this time.
0 commit comments