Adding steps for installing lidarr

This commit is contained in:
2021-03-31 16:20:40 +02:00
parent 9da7a80846
commit a466615d3a

View File

@@ -221,9 +221,55 @@ WantedBy=multi-user.target sonarr.service radarr.service
Alias=nzbget.service Alias=nzbget.service
#RequiredBy=sonarr.service radarr.service" #RequiredBy=sonarr.service radarr.service"
step_11_info() { echo "Create ufw rules for default ports"; } step_11_info() {
step_11_alias() { ALIAS="ufw"; } echo "Install lidarr for arm64"
echoinfo "Default port: 8686"
}
step_11() { step_11() {
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 tar xvzf /tmp/Lidarr.tgz -C /opt/downloaders/
exe mv /opt/downloaders/Lidarr /opt/downloaders/lidarr
exe chown -R ${DLDUSER}:${DLDUSER} /opt/downloaders/lidarr
}
step_12_info() { echo "Create lidarr service"; }
step_12() {
exe mkdir -p "$lidarrConf"
exe chown -R $DLDUSER: "$lidarrConf"
addConf -s "$lidarrService" "$lidarrServiceLoc"
exe systemctl daemon-reload
}
lidarrConf="/opt/downloaders.conf/lidarr"
lidarrServiceLoc="/etc/systemd/system/lidarr.service"
lidarrService="[Unit]
Description=Lidarr Daemon
After=syslog.target network.target
Wants=transmission.service jackett.service nzbget.service
StartLimitIntervalSec=0
[Service]
User=$DLDUSER
Group=$DLDUSER
Type=simple
ExecStart=/opt/downloaders/lidarr/Lidarr -nobrowser -data=$lidarrConf
TimeoutStopSec=20
KillMode=process
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Alias=lidarr.service"
step_13_info() { echo "Create ufw rules for default ports"; }
step_13_alias() { ALIAS="ufw"; }
step_13() {
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"
@@ -242,12 +288,12 @@ step_11() {
echo echo
} }
step_12_info() { step_14_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_12() { step_14() {
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
@@ -264,9 +310,9 @@ step_12() {
exe rm -rf "$buildPath" exe rm -rf "$buildPath"
} }
step_13_info() { echo "Install danted socks proxy"; } step_15_info() { echo "Install danted socks proxy"; }
step_13_alias() { ALIAS="danted"; } step_15_alias() { ALIAS="danted"; }
step_13() { step_15() {
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"
@@ -278,8 +324,8 @@ step_13() {
exe systemctl disable danted.service exe systemctl disable danted.service
} }
step_14_info() { echo "Danted installation notes"; } step_16_info() { echo "Danted installation notes"; }
step_14() { step_16() {
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
@@ -321,9 +367,9 @@ socks block {
DANTED_EOF DANTED_EOF
} }
step_15_info() { echo "Disable apt-daily activities"; } step_17_info() { echo "Disable apt-daily activities"; }
step_15_alias() { ALIAS="aptdaily"; } step_17_alias() { ALIAS="aptdaily"; }
step_15() { step_17() {
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