New steps to install bazarr
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
toolName=mytool
|
toolName=mytool
|
||||||
DLDUSER=dluser
|
DLDUSER=dluser
|
||||||
|
DL_DIR="/opt/downloaders"
|
||||||
|
DL_CONF_DIR="/opt/downloaders.conf"
|
||||||
|
|
||||||
# Get script working directory
|
# Get script working directory
|
||||||
# (when called from a different directory)
|
# (when called from a different directory)
|
||||||
@@ -226,9 +228,12 @@ step_11_info() {
|
|||||||
echoinfo "Default port: 8686"
|
echoinfo "Default port: 8686"
|
||||||
}
|
}
|
||||||
step_11() {
|
step_11() {
|
||||||
|
local lidarrDeps="libchromaprint-tools"
|
||||||
local lidarrUrl="https://lidarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=arm64"
|
local lidarrUrl="https://lidarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=arm64"
|
||||||
exe curl -sL "$lidarrUrl" \
|
exe curl -sL "$lidarrUrl" -o /tmp/Lidarr.tgz
|
||||||
-o /tmp/Lidarr.tgz
|
endReturn -o "Download failed"
|
||||||
|
|
||||||
|
exe apt install $lidarrDeps $APTOPT
|
||||||
|
|
||||||
exe tar xvzf /tmp/Lidarr.tgz -C /opt/downloaders/
|
exe tar xvzf /tmp/Lidarr.tgz -C /opt/downloaders/
|
||||||
exe mv /opt/downloaders/Lidarr /opt/downloaders/lidarr
|
exe mv /opt/downloaders/Lidarr /opt/downloaders/lidarr
|
||||||
@@ -267,9 +272,59 @@ RestartSec=5
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias=lidarr.service"
|
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() {
|
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 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"
|
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
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
step_14_info() {
|
step_16_info() {
|
||||||
echo "Build and install unrar-nonfree"
|
echo "Build and install unrar-nonfree"
|
||||||
echoinfo "Please provide a deb-src sources entry first"
|
echoinfo "Please provide a deb-src sources entry first"
|
||||||
echoinfo "[/etc/apt/sources.list]"
|
echoinfo "[/etc/apt/sources.list]"
|
||||||
}
|
}
|
||||||
step_14() {
|
step_16() {
|
||||||
local buildPath="/tmp/unrarbuild"
|
local buildPath="/tmp/unrarbuild"
|
||||||
|
|
||||||
cat /etc/apt/sources.list | grep -E "^deb-src" >>/dev/null 2>&1
|
cat /etc/apt/sources.list | grep -E "^deb-src" >>/dev/null 2>&1
|
||||||
@@ -310,9 +365,9 @@ step_14() {
|
|||||||
exe rm -rf "$buildPath"
|
exe rm -rf "$buildPath"
|
||||||
}
|
}
|
||||||
|
|
||||||
step_15_info() { echo "Install danted socks proxy"; }
|
step_17_info() { echo "Install danted socks proxy"; }
|
||||||
step_15_alias() { ALIAS="danted"; }
|
step_17_alias() { ALIAS="danted"; }
|
||||||
step_15() {
|
step_17() {
|
||||||
systemctl status danted.service >>/dev/null 2>&1
|
systemctl status danted.service >>/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echoseq " [I] Danted already installed"
|
echoseq " [I] Danted already installed"
|
||||||
@@ -324,8 +379,8 @@ step_15() {
|
|||||||
exe systemctl disable danted.service
|
exe systemctl disable danted.service
|
||||||
}
|
}
|
||||||
|
|
||||||
step_16_info() { echo "Danted installation notes"; }
|
step_18_info() { echo "Danted installation notes"; }
|
||||||
step_16() {
|
step_18() {
|
||||||
cat <<DANTED_EOF
|
cat <<DANTED_EOF
|
||||||
[I] Debian fix systemd startup
|
[I] Debian fix systemd startup
|
||||||
systemctl edit --full danted.service
|
systemctl edit --full danted.service
|
||||||
@@ -367,9 +422,9 @@ socks block {
|
|||||||
DANTED_EOF
|
DANTED_EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
step_17_info() { echo "Disable apt-daily activities"; }
|
step_19_info() { echo "Disable apt-daily activities"; }
|
||||||
step_17_alias() { ALIAS="aptdaily"; }
|
step_19_alias() { ALIAS="aptdaily"; }
|
||||||
step_17() {
|
step_19() {
|
||||||
exe /usr/bin/systemctl stop apt-daily-upgrade.timer
|
exe /usr/bin/systemctl stop apt-daily-upgrade.timer
|
||||||
exe /usr/bin/systemctl stop apt-daily.timer
|
exe /usr/bin/systemctl stop apt-daily.timer
|
||||||
exe /usr/bin/systemctl disable apt-daily-upgrade.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."
|
[ $? -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
|
. /usr/local/bin/sequencer.sh
|
||||||
|
Reference in New Issue
Block a user