lidarr-dl/sonarr/setup.bash

116 lines
4.3 KiB
Bash
Raw Normal View History

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
2023-08-11 17:27:53 +02:00
echo "************ install packages ************"
2023-07-07 21:46:37 +02:00
apk add -U --update --no-cache \
flac \
opus-tools \
jq \
git \
wget \
mkvtoolnix \
python3-dev \
libc-dev \
py3-pip \
gcc \
ffmpeg \
2023-08-11 17:27:53 +02:00
yt-dlp
echo "************ install python packages ************"
2023-07-07 21:46:37 +02:00
pip install --upgrade --no-cache-dir -U \
excludarr \
2023-08-11 17:27:53 +02:00
yq
echo "************ setup SMA ************"
echo "************ setup directory ************"
2023-08-11 17:32:36 +02:00
if [ -d /config/extended/sma ]; then
rm -rf /config/extended/sma
fi
2023-08-11 17:27:53 +02:00
mkdir -p /config/extended/sma
echo "************ download repo ************"
2023-08-11 17:30:37 +02:00
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git /config/extended/sma
2023-08-11 17:27:53 +02:00
mkdir -p /config/extended/sma/config
echo "************ create logging file ************"
mkdir -p /config/extended/sma/config
touch /config/extended/sma/config/sma.log
echo "************ install pip dependencies ************"
pip install --upgrade pip --no-cache-dir
pip install -r /config/extended/sma/setup/requirements.txt --no-cache-dir
chmod 777 -R /config/extended/sma
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
2023-07-07 21:46:37 +02:00
chmod 777 /recyclarr/recyclarr
2023-07-09 02:01:26 +02:00
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community dotnet7-runtime
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 19:51:46 +02:00
echo "Download Recyclarr service..."
2023-07-15 21:37:08 +02:00
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/Recyclarr -o /custom-services.d/Recyclarr
2023-07-08 19:51:46 +02:00
echo "Done"
2023-07-09 02:17:39 +02:00
echo "Download YoutubeSeriesDownloader service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/YoutubeSeriesDownloader.service -o /custom-services.d/YoutubeSeriesDownloader
echo "Done"
2023-07-08 18:48:21 +02:00
mkdir -p /config/extended
if [ ! -f /config/extended/naming.json ]; then
echo "Download Naming script..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/naming.json -o /config/extended/naming.json
echo "Done"
fi
2023-07-08 18:48:21 +02:00
2023-07-08 18:29:34 +02:00
mkdir -p /config/extended
2023-07-20 13:07:02 +02:00
echo "Download Script Functions..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/functions.bash -o /config/extended/functions
echo "Done"
2023-07-08 18:29:34 +02:00
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"
if [ ! -f /config/extended/sma.ini ]; then
echo "Download SMA config..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/sma.ini -o /config/extended/sma.ini
echo "Done"
fi
2023-07-08 19:42:31 +02:00
if [ ! -f /config/extended/recyclarr.yaml ]; then
echo "Download Recyclarr config..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/recyclarr.yaml -o /config/extended/recyclarr.yaml
echo "Done"
fi
2023-07-08 19:51:46 +02:00
2023-07-12 13:57:52 +02:00
if [ ! -f /config/extended.conf ]; then
2023-07-12 13:06:08 +02:00
echo "Download Extended config..."
2023-07-12 13:57:52 +02:00
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sonarr/extended.conf -o /config/extended.conf
2023-07-12 14:26:51 +02:00
chmod 777 /config/extended.conf
2023-07-12 13:06:08 +02:00
echo "Done"
fi
2023-07-08 18:29:34 +02:00
chmod 777 -R /config/extended
2023-07-08 18:29:44 +02:00
exit