mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
Refactor: Whisparr (#11411)
* Refactor * use default msg --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
@@ -27,11 +27,8 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Whisparr"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Whisparr"
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
msg_custom "🚀" "${GN}" "The app offers a built-in updater. Please use it."
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@@ -17,22 +17,20 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y sqlite3
|
||||
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/
|
||||
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
|
||||
rm -rf Whisparr.develop.*.tar.gz
|
||||
msg_ok "Installed Whisparr"
|
||||
msg_ok "Configured Whisparr"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/whisparr.service
|
||||
[Unit]
|
||||
Description=whisparr Daemon
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
UMask=0002
|
||||
Type=simple
|
||||
@@ -40,10 +38,11 @@ ExecStart=/opt/Whisparr/Whisparr -nobrowser -data=/var/lib/whisparr/
|
||||
TimeoutStopSec=20
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable --now -q whisparr
|
||||
systemctl enable -q --now whisparr
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
Reference in New Issue
Block a user