2023-07-09 17:28:21 +02:00
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
SMA_PATH="/usr/local/sma"
|
|
|
|
|
|
|
|
echo "************ install packages ************" && \
|
|
|
|
apk add -U --update --no-cache \
|
|
|
|
flac \
|
|
|
|
opus-tools \
|
|
|
|
jq \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
mkvtoolnix \
|
|
|
|
python3-dev \
|
|
|
|
libc-dev \
|
|
|
|
py3-pip \
|
|
|
|
gcc \
|
2024-03-30 14:46:38 +01:00
|
|
|
ffmpeg && \
|
2023-07-09 17:28:21 +02:00
|
|
|
echo "************ install python packages ************" && \
|
2024-03-22 23:02:50 +01:00
|
|
|
pip install --upgrade --no-cache-dir -U --break-system-packages \
|
2024-06-26 12:48:34 +02:00
|
|
|
excludarr \
|
|
|
|
yt-dlp \
|
|
|
|
yq && \
|
|
|
|
echo "************ setup SMA ************"
|
2024-07-03 21:20:28 +02:00
|
|
|
if [ -d "${SMA_PATH}" ]; then
|
2024-06-26 12:48:34 +02:00
|
|
|
rm -rf "${SMA_PATH}"
|
|
|
|
fi
|
2023-07-09 17:28:21 +02:00
|
|
|
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 ************" && \
|
2024-07-11 18:32:48 +02:00
|
|
|
python3 -m pip install --break-system-packages --upgrade pip && \
|
|
|
|
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt && \
|
2023-07-09 17:28:21 +02:00
|
|
|
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 && \
|
2024-07-11 18:32:48 +02:00
|
|
|
chmod 777 /recyclarr/recyclarr
|
|
|
|
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community dotnet7-runtime
|
2023-07-09 17:28:21 +02:00
|
|
|
|
|
|
|
mkdir -p /custom-services.d
|
|
|
|
echo "Download QueueCleaner service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/QueueCleaner -o /custom-services.d/QueueCleaner
|
|
|
|
echo "Done"
|
|
|
|
|
|
|
|
echo "Download AutoConfig service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/AutoConfig.service -o /custom-services.d/AutoConfig
|
|
|
|
echo "Done"
|
|
|
|
|
|
|
|
echo "Download AutoExtras service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/AutoExtras.service -o /custom-services.d/AutoExtras
|
|
|
|
echo "Done"
|
|
|
|
|
2023-09-05 16:42:27 +02:00
|
|
|
echo "Download InvalidMoviesAutoCleaner service..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/InvalidMoviesAutoCleaner.bash -o /custom-services.d/InvalidMoviesAutoCleaner
|
|
|
|
echo "Done"
|
|
|
|
|
2023-07-15 21:52:14 +02:00
|
|
|
echo "Download UnmappedFolderCleaner service..."
|
2023-07-15 21:56:07 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/UnmappedFolderCleaner.bash -o /custom-services.d/UnmappedFolderCleaner
|
2023-07-15 21:52:14 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-07-09 17:28:21 +02:00
|
|
|
mkdir -p /config/extended
|
2023-07-20 13:06:25 +02:00
|
|
|
echo "Download Script Functions..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/functions.bash -o /config/extended/functions
|
|
|
|
echo "Done"
|
|
|
|
|
2024-07-11 18:32:48 +02:00
|
|
|
|
2023-07-29 17:41:29 +02:00
|
|
|
if [ ! -f /config/extended/naming.json ]; then
|
2024-07-11 18:32:48 +02:00
|
|
|
echo "Download Naming script..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/naming.json -o /config/extended/naming.json
|
|
|
|
echo "Done"
|
2023-07-29 17:41:29 +02:00
|
|
|
fi
|
2023-07-09 17:28:21 +02:00
|
|
|
|
|
|
|
mkdir -p /config/extended
|
|
|
|
echo "Download PlexNotify script..."
|
2024-07-03 21:20:28 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/PlexNotify.bash -o /config/extended/PlexNotify.bash
|
2023-07-09 17:28:21 +02:00
|
|
|
echo "Done"
|
|
|
|
|
|
|
|
echo "Download Extras script..."
|
2024-07-03 21:20:28 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/Extras.bash -o /config/extended/Extras.bash
|
2023-07-09 17:28:21 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-09-05 12:49:18 +02:00
|
|
|
if [ ! -f /config/extended/sma.ini ]; then
|
2024-07-11 18:32:48 +02:00
|
|
|
echo "Download SMA config..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/sma.ini -o /config/extended/sma.ini
|
|
|
|
echo "Done"
|
2023-09-05 12:49:18 +02:00
|
|
|
fi
|
2023-07-09 17:28:21 +02:00
|
|
|
|
2023-10-25 20:11:45 +02:00
|
|
|
echo "Download Recyclarr service..."
|
2024-07-05 18:20:33 +02:00
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/Recyclarr -o /custom-services.d/Recyclarr
|
2023-10-25 20:11:45 +02:00
|
|
|
echo "Done"
|
|
|
|
|
2023-09-05 12:49:18 +02:00
|
|
|
if [ ! -f /config/extended/recyclarr.yaml ]; then
|
2024-07-11 18:32:48 +02:00
|
|
|
echo "Download Recyclarr config..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/recyclarr.yaml -o /config/extended/recyclarr.yaml
|
|
|
|
echo "Done"
|
2023-09-05 12:49:18 +02:00
|
|
|
fi
|
2023-07-09 17:28:21 +02:00
|
|
|
|
2023-07-12 14:51:55 +02:00
|
|
|
if [ ! -f /config/extended.conf ]; then
|
2024-07-11 18:32:48 +02:00
|
|
|
echo "Download Extended config..."
|
|
|
|
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/extended.conf -o /config/extended.conf
|
|
|
|
chmod 777 /config/extended.conf
|
|
|
|
echo "Done"
|
2023-07-12 14:51:55 +02:00
|
|
|
fi
|
|
|
|
|
2024-07-11 18:32:48 +02:00
|
|
|
|
2023-07-09 17:28:21 +02:00
|
|
|
chmod 777 -R /config/extended
|
2024-04-23 16:05:16 +02:00
|
|
|
if [ -f /custom-services.d/scripts_init.bash ]; then
|
|
|
|
# user misconfiguration detected, sleeping...
|
|
|
|
sleep infinity
|
|
|
|
fi
|
2023-07-09 17:28:21 +02:00
|
|
|
exit
|