Refactor: Whisparr (#11411)

* Refactor

* use default msg

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
Slaviša Arežina
2026-02-01 13:27:59 +01:00
committed by GitHub
parent 72b54447c3
commit e4a4329d1a
2 changed files with 9 additions and 13 deletions

View File

@@ -27,11 +27,8 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
msg_info "Updating Whisparr"
$STD apt update msg_custom "🚀" "${GN}" "The app offers a built-in updater. Please use it."
$STD apt -y upgrade
msg_ok "Updated Whisparr"
msg_ok "Updated successfully!"
exit exit
} }

View File

@@ -17,22 +17,20 @@ msg_info "Installing Dependencies"
$STD apt install -y sqlite3 $STD apt install -y sqlite3
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Whisparr" fetch_and_deploy_from_url "https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64" /opt/Whisparr
msg_info "Configuring Whisparr"
mkdir -p /var/lib/whisparr/ mkdir -p /var/lib/whisparr/
chmod 775 /var/lib/whisparr/ chmod 775 /var/lib/whisparr/
cd /var/lib/whisparr/
$STD curl -fsSL 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' -o whisparr.tar.gz
$STD tar -xvzf whisparr.tar.gz
mv Whisparr /opt
chmod 775 /opt/Whisparr chmod 775 /opt/Whisparr
rm -rf Whisparr.develop.*.tar.gz msg_ok "Configured Whisparr"
msg_ok "Installed Whisparr"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/whisparr.service cat <<EOF >/etc/systemd/system/whisparr.service
[Unit] [Unit]
Description=whisparr Daemon Description=whisparr Daemon
After=syslog.target network.target After=syslog.target network.target
[Service] [Service]
UMask=0002 UMask=0002
Type=simple Type=simple
@@ -40,10 +38,11 @@ ExecStart=/opt/Whisparr/Whisparr -nobrowser -data=/var/lib/whisparr/
TimeoutStopSec=20 TimeoutStopSec=20
KillMode=process KillMode=process
Restart=on-failure Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable --now -q whisparr systemctl enable -q --now whisparr
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh