From ba24f970d9ce87824468479fcea6b83795b587d5 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Mon, 25 Aug 2025 17:28:26 +0200 Subject: [PATCH] downloader - Install now sonarr from archive (as the rest); Some other small fixes --- seqs/downloader.sh | 66 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/seqs/downloader.sh b/seqs/downloader.sh index a9fa749..27a9958 100755 --- a/seqs/downloader.sh +++ b/seqs/downloader.sh @@ -50,15 +50,47 @@ step_4_info() { echoinfo "Default port: 8989" } step_4() { - exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 - exep "echo \"deb https://apt.sonarr.tv/debian buster main\" | tee /etc/apt/sources.list.d/sonarr.list" - exe apt update - exe apt install sonarr - # Start of sonar must be managed by VPN service - exe service sonarr stop - exe systemctl disable sonarr + local lService=`eval "echo \"$sonarrService\""` + local appTar="/tmp/Sonarr.tgz" + local appUrl="https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=arm64" + local appConf="${DLD_CONFDIR}/sonarr" + local appServiceLoc="/etc/systemd/system/sonarr.service" + + [ ! -e "$appTar" ] && exe curl -sL "$appUrl" -o "$appTar" + + exe tar xvzf "$appTar" -C "${DLD_DIR}" + exe mv "${DLD_DIR}/Sonarr" "${DLD_DIR}/sonarr" + exe chown -R ${DLD_USER}:${DLD_USER} "${DLD_DIR}/sonarr" + + exe mkdir -p "$appConf" + exe chown -R ${DLD_USER}: "$appConf" + + addConf -s "$lService" "$appServiceLoc" + exe systemctl daemon-reload } +sonarrService="[Unit] +Description=Sonarr Daemon +After=syslog.target network.target +Wants=transmission.service jackett.service nzbget.service +StartLimitIntervalSec=0 + +[Service] +User=\$DLD_USER +Group=\$DLD_USER + +Type=simple + +ExecStart=\${DLD_DIR}/sonarr/Sonarr -nobrowser -data=\${DLD_CONFDIR}/sonarr +TimeoutStopSec=20 +KillMode=process +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +Alias=sonarr.service" + step_5_info() { echo "Install radarr for arm64" echoinfo "Default port: 7878" @@ -69,6 +101,7 @@ step_5() { exe curl -sL "https://radarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=arm64" \ -o /tmp/Radarr.tgz + exe mkdir -p "${DLD_DIR}" exe tar xvzf /tmp/Radarr.tgz -C "${DLD_DIR}/" exe mv ${DLD_DIR}/Radarr "${DLD_DIR}/radarr" exe chown -R ${DLD_USER}:${DLD_USER} "${DLD_DIR}/radarr" @@ -76,13 +109,14 @@ step_5() { step_6_info() { echo "Create radarr service"; } step_6() { + local lService=`eval "echo \"$radarrService\""` local radarrConf="${DLD_CONFDIR}/radarr" local radarrServiceLoc="/etc/systemd/system/radarr.service" exe mkdir -p "$radarrConf" exe chown -R $DLD_USER: "$radarrConf" - addConf -s "$radarrService" "$radarrServiceLoc" + addConf -s "$lService" "$radarrServiceLoc" exe systemctl daemon-reload } radarrService="[Unit] @@ -92,12 +126,12 @@ Wants=transmission.service jackett.service nzbget.service StartLimitIntervalSec=0 [Service] -User=\$DLD_USER -Group=\$DLD_USER +User=\${DLD_USER} +Group=\${DLD_USER} Type=simple -ExecStart=\${DLD_DIR}/radarr/Radarr -nobrowser -data=\$radarrConf +ExecStart=\${DLD_DIR}/radarr/Radarr -nobrowser -data=\${DLD_CONFDIR}/radarr TimeoutStopSec=20 KillMode=process Restart=on-failure @@ -371,11 +405,15 @@ step_18_info() { echo "Danted installation notes"; } step_18() { cat <