Skip to content

Commit 9326a80

Browse files
committed
Stopped startup script from overwriting Deemix and Tidal configs
1 parent ae84972 commit 9326a80

File tree

1 file changed

+79
-77
lines changed

1 file changed

+79
-77
lines changed

lidarr/setup.bash

Lines changed: 79 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,60 @@
22
SMA_PATH="/usr/local/sma"
33
version="1.3"
44

5-
echo "*** install packages ***" && \
6-
apk add -U --upgrade --no-cache \
7-
tidyhtml \
8-
musl-locales \
9-
musl-locales-lang \
10-
flac \
11-
jq \
12-
git \
13-
gcc \
14-
ffmpeg \
15-
imagemagick \
16-
opus-tools \
17-
opustags \
18-
python3-dev \
19-
libc-dev \
20-
py3-pip \
21-
npm && \
22-
echo "*** install freyr client ***" && \
23-
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing atomicparsley && \
24-
npm install -g miraclx/freyr-js &&\
25-
echo "*** install python packages ***" && \
26-
pip install --upgrade --no-cache-dir --break-system-packages \
27-
jellyfish \
28-
beautifulsoup4 \
29-
yt-dlp \
30-
beets \
31-
yq \
32-
pyxDamerauLevenshtein \
33-
pyacoustid \
34-
requests \
35-
colorama \
36-
python-telegram-bot \
37-
pylast \
38-
mutagen \
39-
r128gain \
40-
tidal-dl \
41-
deemix && \
42-
echo "************ setup SMA ************"
43-
if [ -d "${SMA_PATH}" ]; then
5+
echo "*** install packages ***" &&
6+
apk add -U --upgrade --no-cache \
7+
tidyhtml \
8+
musl-locales \
9+
musl-locales-lang \
10+
flac \
11+
jq \
12+
git \
13+
gcc \
14+
ffmpeg \
15+
imagemagick \
16+
opus-tools \
17+
opustags \
18+
python3-dev \
19+
libc-dev \
20+
py3-pip \
21+
npm &&
22+
echo "*** install freyr client ***" &&
23+
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing atomicparsley &&
24+
npm install -g miraclx/freyr-js &&
25+
echo "*** install python packages ***" &&
26+
pip install --upgrade --no-cache-dir --break-system-packages \
27+
jellyfish \
28+
beautifulsoup4 \
29+
yt-dlp \
30+
beets \
31+
yq \
32+
pyxDamerauLevenshtein \
33+
pyacoustid \
34+
requests \
35+
colorama \
36+
python-telegram-bot \
37+
pylast \
38+
mutagen \
39+
r128gain \
40+
tidal-dl \
41+
deemix &&
42+
echo "************ setup SMA ************"
43+
if [ -d "${SMA_PATH}" ]; then
4444
rm -rf "${SMA_PATH}"
4545
fi
46-
echo "************ setup directory ************" && \
47-
mkdir -p ${SMA_PATH} && \
48-
echo "************ download repo ************" && \
49-
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \
50-
mkdir -p ${SMA_PATH}/config && \
51-
echo "************ create logging file ************" && \
52-
mkdir -p ${SMA_PATH}/config && \
53-
touch ${SMA_PATH}/config/sma.log && \
54-
chgrp users ${SMA_PATH}/config/sma.log && \
55-
chmod g+w ${SMA_PATH}/config/sma.log && \
56-
echo "************ install pip dependencies ************" && \
57-
python3 -m pip install --break-system-packages --upgrade pip && \
58-
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt
46+
echo "************ setup directory ************" &&
47+
mkdir -p ${SMA_PATH} &&
48+
echo "************ download repo ************" &&
49+
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} &&
50+
mkdir -p ${SMA_PATH}/config &&
51+
echo "************ create logging file ************" &&
52+
mkdir -p ${SMA_PATH}/config &&
53+
touch ${SMA_PATH}/config/sma.log &&
54+
chgrp users ${SMA_PATH}/config/sma.log &&
55+
chmod g+w ${SMA_PATH}/config/sma.log &&
56+
echo "************ install pip dependencies ************" &&
57+
python3 -m pip install --break-system-packages --upgrade pip &&
58+
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt
5959

6060
mkdir -p /custom-services.d
6161

@@ -92,8 +92,6 @@ echo "Download ARLChecker service..."
9292
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/python/ARLChecker.py -o /custom-services.d/python/ARLChecker.py
9393
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/ARLChecker -o /custom-services.d/ARLChecker
9494

95-
96-
9795
echo "Done"
9896

9997
mkdir -p /config/extended
@@ -102,32 +100,36 @@ curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal
102100
echo "Done"
103101

104102
echo "Download PlexNotify script..."
105-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/PlexNotify.bash -o /config/extended/PlexNotify.bash
103+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/PlexNotify.bash -o /config/extended/PlexNotify.bash
106104
echo "Done"
107105

108106
echo "Download SMA config..."
109-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/sma.ini -o /config/extended/sma.ini
107+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/sma.ini -o /config/extended/sma.ini
110108
echo "Done"
111109

112110
if [ ! -f /config/extended/beets-config.yaml ]; then
113-
echo "Download Beets config..."
114-
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config.yaml" -o /config/extended/beets-config.yaml
115-
echo "Done"
111+
echo "Download Beets config..."
112+
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config.yaml" -o /config/extended/beets-config.yaml
113+
echo "Done"
116114
fi
117115

118116
if [ ! -f /config/extended/beets-config-lidarr.yaml ]; then
119-
echo "Download Beets lidarr config..."
120-
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config-lidarr.yaml" -o /config/extended/beets-config-lidarr.yaml
121-
echo "Done"
117+
echo "Download Beets lidarr config..."
118+
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config-lidarr.yaml" -o /config/extended/beets-config-lidarr.yaml
119+
echo "Done"
122120
fi
123121

124-
echo "Download Deemix config..."
125-
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/deemix_config.json" -o /config/extended/deemix_config.json
126-
echo "Done"
122+
if [ ! -f /config/extended/deemix_config.json ]; then
123+
echo "Download Deemix config..."
124+
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/deemix_config.json" -o /config/extended/deemix_config.json
125+
echo "Done"
126+
fi
127127

128-
echo "Download Tidal config..."
129-
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json
130-
echo "Done"
128+
if [ ! -f /config/extended/tidal-dl.json ]; then
129+
echo "Download Tidal config..."
130+
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json
131+
echo "Done"
132+
fi
131133

132134
echo "Download LyricExtractor script..."
133135
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/LyricExtractor.bash -o /config/extended/LyricExtractor.bash
@@ -142,23 +144,23 @@ curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/Be
142144
echo "Done"
143145

144146
if [ ! -f /config/extended/beets-genre-whitelist.txt ]; then
145-
echo "Download beets-genre-whitelist.txt..."
146-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-genre-whitelist.txt -o /config/extended/beets-genre-whitelist.txt
147-
echo "Done"
147+
echo "Download beets-genre-whitelist.txt..."
148+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-genre-whitelist.txt -o /config/extended/beets-genre-whitelist.txt
149+
echo "Done"
148150
fi
149151

150152
if [ ! -f /config/extended.conf ]; then
151-
echo "Download Extended config..."
152-
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/extended.conf -o /config/extended.conf
153-
chmod 777 /config/extended.conf
154-
echo "Done"
153+
echo "Download Extended config..."
154+
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/extended.conf -o /config/extended.conf
155+
chmod 777 /config/extended.conf
156+
echo "Done"
155157
fi
156158

157159
chmod 777 -R /config/extended
158160
chmod 777 -R /root
159161

160162
if [ -f /custom-services.d/scripts_init.bash ]; then
161-
# user misconfiguration detected, sleeping...
162-
sleep infinity
163+
# user misconfiguration detected, sleeping...
164+
sleep infinity
163165
fi
164166
exit

0 commit comments

Comments
 (0)