Skip to content

Commit 1e3608c

Browse files
Merge pull request #281 from billsbdb3/main
added || true after pip install/changed alpine link to point to dontn…
2 parents fdbd448 + 4892b40 commit 1e3608c

File tree

2 files changed

+50
-36
lines changed

2 files changed

+50
-36
lines changed

radarr/setup.bash

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ apk add -U --update --no-cache \
1515
gcc \
1616
ffmpeg && \
1717
echo "************ install python packages ************" && \
18+
pip install --upgrade pip==24.1 && \
1819
pip install --upgrade --no-cache-dir -U --break-system-packages \
1920
excludarr \
2021
yt-dlp \
@@ -48,14 +49,20 @@ touch ${SMA_PATH}/config/sma.log && \
4849
chgrp users ${SMA_PATH}/config/sma.log && \
4950
chmod g+w ${SMA_PATH}/config/sma.log && \
5051
echo "************ install pip dependencies ************" && \
51-
python3 -m pip install --break-system-packages --upgrade pip && \
52-
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt && \
52+
python3 -m pip install --break-system-packages --upgrade pip==24.1 && \
53+
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt || true
54+
55+
echo "************ install qtfaststart ************" && \
56+
git clone https://github.com/danielgtaylor/qtfaststart.git /tmp/qtfaststart && \
57+
cd /tmp/qtfaststart && \
58+
python3 setup.py install
59+
5360
echo "************ install recyclarr ************" && \
5461
mkdir -p /recyclarr && \
5562
wget "https://github.com/recyclarr/recyclarr/releases/latest/download/recyclarr-linux-musl-x64.tar.xz" -O "/recyclarr/recyclarr.tar.xz" && \
5663
tar -xf /recyclarr/recyclarr.tar.xz -C /recyclarr &>/dev/null && \
57-
chmod 777 /recyclarr/recyclarr
58-
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community dotnet7-runtime
64+
chmod 777 /recyclarr/recyclarr && \
65+
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community dotnet8-runtime
5966

6067
mkdir -p /custom-services.d
6168
echo "Download QueueCleaner service..."
@@ -83,11 +90,10 @@ echo "Download Script Functions..."
8390
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/functions.bash -o /config/extended/functions
8491
echo "Done"
8592

86-
8793
if [ ! -f /config/extended/naming.json ]; then
88-
echo "Download Naming script..."
89-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/naming.json -o /config/extended/naming.json
90-
echo "Done"
94+
echo "Download Naming script..."
95+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/naming.json -o /config/extended/naming.json
96+
echo "Done"
9197
fi
9298

9399
mkdir -p /config/extended
@@ -100,29 +106,28 @@ curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/Ex
100106
echo "Done"
101107

102108
if [ ! -f /config/extended/sma.ini ]; then
103-
echo "Download SMA config..."
104-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/sma.ini -o /config/extended/sma.ini
105-
echo "Done"
109+
echo "Download SMA config..."
110+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/sma.ini -o /config/extended/sma.ini
111+
echo "Done"
106112
fi
107113

108114
echo "Download Recyclarr service..."
109-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/Recyclarr -o /custom-services.d/Recyclarr
115+
curl https://raw.githubusercontent.com/billsbdb3/arr-scripts/main/universal/services/Recyclarr -o /custom-services.d/Recyclarr
110116
echo "Done"
111117

112118
if [ ! -f /config/extended/recyclarr.yaml ]; then
113-
echo "Download Recyclarr config..."
114-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/recyclarr.yaml -o /config/extended/recyclarr.yaml
115-
echo "Done"
119+
echo "Download Recyclarr config..."
120+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/recyclarr.yaml -o /config/extended/recyclarr.yaml
121+
echo "Done"
116122
fi
117123

118124
if [ ! -f /config/extended.conf ]; then
119-
echo "Download Extended config..."
120-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/extended.conf -o /config/extended.conf
121-
chmod 777 /config/extended.conf
122-
echo "Done"
125+
echo "Download Extended config..."
126+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/extended.conf -o /config/extended.conf
127+
chmod 777 /config/extended.conf
128+
echo "Done"
123129
fi
124130

125-
126131
chmod 777 -R /config/extended
127132
if [ -f /custom-services.d/scripts_init.bash ]; then
128133
# user misconfiguration detected, sleeping...

universal/services/Recyclarr

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ source /config/extended.conf
88
source /config/extended/functions
99
#### Create Log File
1010
logfileSetup
11-
#### Check Arr App
12-
getArrAppInfo
13-
verifyApiAccess
11+
12+
logfile="/config/logs/$logFileName"
13+
14+
log() {
15+
m_time=$(date "+%F %T")
16+
echo "$m_time :: $scriptName :: $scriptVersion :: $1" | tee -a "$logfile"
17+
}
1418

1519
verifyConfig () {
1620
if [ "$enableRecyclarr" != "true" ]; then
@@ -27,30 +31,35 @@ verifyConfig () {
2731
RecyclarrProcess () {
2832
# Configure Yaml with URL and API Key
2933
sed -i "s%arrUrl%$arrUrl%g" "/config/extended/recyclarr.yaml"
30-
sed -i "s%arrApi%$arrApiKey%g" "/config/extended/recyclarr.yaml"
34+
sed -i "s%arrApi%$arrApiKey%g" "/config/extended/recyclarr.yaml"
3135

32-
# update arr app
3336
log "Updating Arr via Recyclarr"
37+
3438
if [ ! -d /config/extended/recyclarr-data ]; then
3539
mkdir -p /config/extended/recyclarr-data
3640
chmod 777 /config/extended/recyclarr-data
3741
fi
38-
/recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data
39-
4042

43+
# Capture the output of the Recyclarr command
44+
recyclarr_output=$(/recyclarr/recyclarr sync -c $recyclarrConfig --app-data /config/extended/recyclarr-data 2>&1)
45+
46+
# Log the output line by line
47+
while IFS= read -r line; do
48+
log "$line"
49+
done <<< "$recyclarr_output"
50+
4151
log "Complete"
4252
}
4353

44-
# Loop Script
54+
# Main Loop
4555
for (( ; ; )); do
46-
let i++
47-
logfileSetup
48-
verifyConfig
49-
getArrAppInfo
50-
verifyApiAccess
51-
RecyclarrProcess
52-
log "Script sleeping for $recyclarrScriptInterval..."
53-
sleep $recyclarrScriptInterval
56+
logfileSetup
57+
verifyConfig
58+
getArrAppInfo
59+
verifyApiAccess
60+
RecyclarrProcess
61+
log "Script sleeping for $recyclarrScriptInterval..."
62+
sleep $recyclarrScriptInterval
5463
done
5564

5665
exit

0 commit comments

Comments
 (0)