downloader - Install now sonarr from archive (as the rest); Some other small fixes

This commit is contained in:
2025-08-25 17:28:26 +02:00
parent 22dddfc987
commit ba24f970d9

View File

@@ -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 <<DANTED_EOF
[I] Debian fix systemd startup
systemctl edit --full danted.service
systemctl edit danted.service
# Change /lib64 to -/lib64
ReadOnlyDirectories=/bin /etc /lib -/lib64 /sbin /usr /var
# Grant access to /var/log
[Service]
ReadWriteDirectories=/var/log
[I] Basic danted settings
* Restrict to local network
* Separate logfile
@@ -463,7 +501,7 @@ step_22() {
exe rm -rf "$pTar"
if [ $prowlarrUpgrade -ne 0 ]; then
info "Stopping sequence here."
info " Following steps only exected for fresh installation."
info " Following steps only executed for fresh installation."
exit 0
fi
}
@@ -541,7 +579,7 @@ step_31() {
exe rm -rf "$readarrTar"
if [ $readarrUpgrade -ne 0 ]; then
info "Stopping sequence here."
info " Following steps only exected for fresh installation."
info " Following steps only executed for fresh installation."
exit 0
fi
}