mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 17:25:53 +00:00
finalize wizarr
This commit is contained in:
18
ct/wizarr.sh
18
ct/wizarr.sh
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
@@ -29,8 +29,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/wizarr_version.txt)" ]] || [[ ! -f /opt/wizarr_version.txt ]]; then
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat ~/.wizarr 2>/dev/null)" ]] || [[ ! -f ~/.wizarr ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop wizarr
|
||||
msg_ok "Stopped $APP"
|
||||
@@ -40,13 +40,11 @@ function update_script() {
|
||||
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
|
||||
msg_ok "Backup Created"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
rm -rf /opt/wizarr
|
||||
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
|
||||
unzip -q /tmp/"$RELEASE".zip
|
||||
mv wizarr-${RELEASE}/ /opt/wizarr
|
||||
cd /opt/wizarr
|
||||
setup_uv
|
||||
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt/wizarr
|
||||
uv -q sync --locked
|
||||
$STD uv -q run pybabel compile -d app/translations
|
||||
$STD npm --prefix app/static install
|
||||
@@ -64,8 +62,6 @@ function update_script() {
|
||||
rm -rf "$BACKUP_FILE"
|
||||
rm /tmp/"$RELEASE".zip
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
echo "${RELEASE}" >/opt/wizarr_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
|
||||
Reference in New Issue
Block a user