-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts_init.bash
More file actions
67 lines (55 loc) · 2.01 KB
/
Copy pathscripts_init.bash
File metadata and controls
67 lines (55 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/with-contenv bash
version="2.1"
installDependencies () {
echo "Installing script dependencies...."
if apk --no-cache list | grep installed | grep mkvtoolnix | read; then
echo "Dependencies already installed, skipping..."
else
apk add -U --update --no-cache \
jq \
xq \
git \
opus-tools \
mkvtoolnix \
ffmpeg
echo "done"
fi
# Delete SMA Folder
if [ -d /config/scripts/sma ]; then
rm -rf /config/scripts/sma
fi
# Create SMA Folder
if [ ! -d /config/scripts/sma ]; then
mkdir -p /config/scripts/sma
chmod 777 /config/scripts/sma
fi
echo "************ setup directory ************"
mkdir -p /config/scripts/sma
echo "************ download repo ************"
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git /config/scripts/sma
mkdir -p /config/scripts/sma/config
echo "************ create logging file ************"
mkdir -p /config/scripts/sma/config
touch /config/scripts/sma/config/sma.log
echo "************ install pip dependencies ************"
pip install --upgrade pip --no-cache-dir --break-system-packages
pip install -r /config/scripts/sma/setup/requirements.txt --no-cache-dir --break-system-packages
chmod 777 -R /config/scripts/sma
}
installDependencies
# Create Script Folder
if [ ! -d /config/scripts ]; then
mkdir -p /config/scripts
fi
if [ ! -f /config/scripts/settings.conf ]; then
echo "Download Settings config..."
curl "https://raw.githubusercontent.com/RandomNinjaAtk/sabnzbd-scripts/refs/heads/master/setting.conf" -o /config/scripts/settings.conf
echo "Done"
fi
echo "Downloading Video script: /config/scripts/video.bash"
curl "https://raw.githubusercontent.com/RandomNinjaAtk/sabnzbd-scripts/refs/heads/master/video.bash" -o /config/scripts/video.bash
echo "Downloading SMA config: /config/scripts/autoProcess.ini"
curl "https://raw.githubusercontent.com/RandomNinjaAtk/sabnzbd-scripts/refs/heads/master/autoProcess.ini" -o /config/scripts/autoProcess.ini
# Set Permissions
chmod 777 -R /config/scripts
exit