2023-07-07 21:46:37 +02:00
|
|
|
#!/usr/bin/with-contenv bash
|
2023-07-08 18:14:56 +02:00
|
|
|
SMA_PATH="/usr/local/sma"
|
2023-07-07 21:46:37 +02:00
|
|
|
|
|
|
|
echo "************ install packages ************" && \
|
|
|
|
apk add -U --update --no-cache \
|
|
|
|
flac \
|
|
|
|
opus-tools \
|
|
|
|
jq \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
mkvtoolnix \
|
|
|
|
python3-dev \
|
|
|
|
libc-dev \
|
|
|
|
py3-pip \
|
|
|
|
gcc \
|
|
|
|
ffmpeg \
|
|
|
|
yt-dlp && \
|
|
|
|
echo "************ install python packages ************" && \
|
|
|
|
pip install --upgrade --no-cache-dir -U \
|
|
|
|
excludarr \
|
|
|
|
yq && \
|
|
|
|
echo "************ setup SMA ************" && \
|
|
|
|
echo "************ setup directory ************" && \
|
|
|
|
mkdir -p ${SMA_PATH} && \
|
|
|
|
echo "************ download repo ************" && \
|
|
|
|
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \
|
|
|
|
mkdir -p ${SMA_PATH}/config && \
|
|
|
|
echo "************ create logging file ************" && \
|
|
|
|
mkdir -p ${SMA_PATH}/config && \
|
|
|
|
touch ${SMA_PATH}/config/sma.log && \
|
|
|
|
chgrp users ${SMA_PATH}/config/sma.log && \
|
|
|
|
chmod g+w ${SMA_PATH}/config/sma.log && \
|
|
|
|
echo "************ install pip dependencies ************" && \
|
|
|
|
python3 -m pip install --user --upgrade pip && \
|
|
|
|
pip3 install -r ${SMA_PATH}/setup/requirements.txt && \
|
|
|
|
echo "************ install recyclarr ************" && \
|
|
|
|
mkdir -p /recyclarr && \
|
|
|
|
wget "https://github.com/recyclarr/recyclarr/releases/latest/download/recyclarr-linux-musl-x64.tar.xz" -O "/recyclarr/recyclarr.tar.xz" && \
|
|
|
|
tar -xf /recyclarr/recyclarr.tar.xz -C /recyclarr &>/dev/null && \
|
|
|
|
chmod 777 /recyclarr/recyclarr
|
2023-07-08 18:19:10 +02:00
|
|
|
|
|
|
|
mkdir -p /custom-services.d
|
2023-07-08 18:22:06 +02:00
|
|
|
echo "Download QueueCleaner service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/QueueCleaner -o /custom-services.d/QueueCleaner
|
|
|
|
echo "Done"
|
2023-07-08 18:29:34 +02:00
|
|
|
|
2023-07-08 18:39:32 +02:00
|
|
|
echo "Download AutoConfig service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/AutoConfig.service -o /custom-services.d/AutoConfig
|
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 19:24:18 +02:00
|
|
|
echo "Download AutoExtras service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/AutoExtras.service -o /custom-services.d/AutoExtras
|
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 19:33:36 +02:00
|
|
|
echo "Download InvalidSeriesAutoCleaner service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/InvalidSeriesAutoCleaner.service -o /custom-services.d/InvalidSeriesAutoCleaner
|
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 18:48:21 +02:00
|
|
|
mkdir -p /config/extended
|
|
|
|
echo "Download Naming script..."
|
2023-07-08 19:43:22 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/naming.json -o /config/extended/naming.json
|
2023-07-08 18:48:21 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 18:29:34 +02:00
|
|
|
mkdir -p /config/extended
|
|
|
|
echo "Download PlexNotify script..."
|
2023-07-08 19:43:22 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/PlexNotify.bash -o /config/extended/PlexNotify.bash
|
2023-07-08 18:29:34 +02:00
|
|
|
echo "Done"
|
2023-07-08 19:00:46 +02:00
|
|
|
|
|
|
|
echo "Download DailySeriesEpisodeTrimmer script..."
|
2023-07-08 19:43:22 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/DailySeriesEpisodeTrimmer.bash -o /config/extended/DailySeriesEpisodeTrimmer.bash
|
2023-07-08 19:00:46 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 19:05:02 +02:00
|
|
|
echo "Download Extras script..."
|
2023-07-08 19:43:22 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/Extras.bash -o /config/extended/Extras.bash
|
2023-07-08 19:05:02 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 19:42:31 +02:00
|
|
|
echo "Download SMA config..."
|
2023-07-08 19:43:22 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/sma.ini -o /config/extended/sma.ini
|
2023-07-08 19:42:31 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-07-08 18:29:34 +02:00
|
|
|
chmod 777 -R /config/extended
|
2023-07-08 18:29:44 +02:00
|
|
|
|
|
|
|
exit
|