New steps to install bazarr

This commit is contained in:
2021-04-19 22:21:31 +02:00
parent b7f41c4ec7
commit 4f2d80bbc9

View File

@@ -2,6 +2,8 @@
toolName=mytool
DLDUSER=dluser
DL_DIR="/opt/downloaders"
DL_CONF_DIR="/opt/downloaders.conf"
# Get script working directory
# (when called from a different directory)
@@ -226,9 +228,12 @@ step_11_info() {
echoinfo "Default port: 8686"
}
step_11() {
local lidarrDeps="libchromaprint-tools"
local lidarrUrl="https://lidarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=arm64"
exe curl -sL "$lidarrUrl" \
-o /tmp/Lidarr.tgz
exe curl -sL "$lidarrUrl" -o /tmp/Lidarr.tgz
endReturn -o "Download failed"
exe apt install $lidarrDeps $APTOPT
exe tar xvzf /tmp/Lidarr.tgz -C /opt/downloaders/
exe mv /opt/downloaders/Lidarr /opt/downloaders/lidarr
@@ -267,9 +272,59 @@ RestartSec=5
WantedBy=multi-user.target
Alias=lidarr.service"
step_13_info() { echo "Create ufw rules for default ports"; }
step_13_alias() { ALIAS="ufw"; }
step_13_info() { echo "Install bazarr dependencies"; }
step_13() {
local bazarrDeps="python3-pip python3-distutils python3-venv"
#local bazarrDeps+=" libxml2-dev libxslt1-dev python3-libxml2 python3-lxml libatlas-base-dev" #ffmpeg
exe apt install $bazarrDeps $APTOPT
}
step_14_info() { echo "Install bazarr"; }
step_14() {
local bazarrVenv="${DL_DIR}/bazarr"
local bazarrDir="${bazarrVenv}/bazarr"
local bazarrGitUrl="https://github.com/morpheus65535/bazarr.git"
#exe python3 -m venv "$bazarrVenv"
#endReturn -o $? "Creating virtual environment failed"
#exe git clone $bazarrGitUrl "$bazarrDir"
#exe chown -R $DLDUSER: "$bazarrVenv"
#exe sudo -u $DLDUSER ${bazarrVenv}/bin/pip install --upgrade pip
#exe sudo -u $DLDUSER ${bazarrVenv}/bin/pip install -r ${bazarrDir}/requirements.txt
addConf -s "$bazarrService" "$bazarrServiceLoc"
exe systemctl daemon-reload
}
bazarrServiceLoc="/etc/systemd/system/bazarr.service"
bazarrService="[Unit]
Description=Bazarr
After=syslog.target network.target
Wants=sonarr.service radarr.service
StartLimitIntervalSec=0
[Service]
User=$DLDUSER
Group=$DLDUSER
Type=simple
ExecStart=/opt/downloaders/bazarr/bin/python3 /opt/downloaders/bazarr/bazarr/bazarr.py
TimeoutStopSec=20
#KillMode=process
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Alias=bazarr.service"
step_15_info() { echo "Create ufw rules for default ports"; }
step_15_alias() { ALIAS="ufw"; }
step_15() {
exe ufw allow in on eth0 to any port 6789 proto tcp comment "NZBGet"
exe ufw allow in on eth0 to any port 9117 proto tcp comment "Jackett. Rules for Sonarr und Radarr in /etc/ufw/rules.before"
@@ -288,12 +343,12 @@ step_13() {
echo
}
step_14_info() {
step_16_info() {
echo "Build and install unrar-nonfree"
echoinfo "Please provide a deb-src sources entry first"
echoinfo "[/etc/apt/sources.list]"
}
step_14() {
step_16() {
local buildPath="/tmp/unrarbuild"
cat /etc/apt/sources.list | grep -E "^deb-src" >>/dev/null 2>&1
@@ -310,9 +365,9 @@ step_14() {
exe rm -rf "$buildPath"
}
step_15_info() { echo "Install danted socks proxy"; }
step_15_alias() { ALIAS="danted"; }
step_15() {
step_17_info() { echo "Install danted socks proxy"; }
step_17_alias() { ALIAS="danted"; }
step_17() {
systemctl status danted.service >>/dev/null 2>&1
if [ $? -eq 0 ]; then
echoseq " [I] Danted already installed"
@@ -324,8 +379,8 @@ step_15() {
exe systemctl disable danted.service
}
step_16_info() { echo "Danted installation notes"; }
step_16() {
step_18_info() { echo "Danted installation notes"; }
step_18() {
cat <<DANTED_EOF
[I] Debian fix systemd startup
systemctl edit --full danted.service
@@ -367,9 +422,9 @@ socks block {
DANTED_EOF
}
step_17_info() { echo "Disable apt-daily activities"; }
step_17_alias() { ALIAS="aptdaily"; }
step_17() {
step_19_info() { echo "Disable apt-daily activities"; }
step_19_alias() { ALIAS="aptdaily"; }
step_19() {
exe /usr/bin/systemctl stop apt-daily-upgrade.timer
exe /usr/bin/systemctl stop apt-daily.timer
exe /usr/bin/systemctl disable apt-daily-upgrade.timer
@@ -383,5 +438,5 @@ checkVpn() {
[ $? -eq 0 ] && echoseq " [W] A VPN connection is possibly active. Consider deactivating it befor any apt operation."
}
VERSION_SEQREV=12
VERSION_SEQREV=13
. /usr/local/bin/sequencer.sh