finalize wizarr
This commit is contained in:
parent
75e64829c7
commit
61113b399c
18
ct/wizarr.sh
18
ct/wizarr.sh
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: vhsdream
|
# Author: vhsdream
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
@ -29,8 +29,8 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
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 /opt/wizarr_version.txt)" ]] || [[ ! -f /opt/wizarr_version.txt ]]; then
|
if [[ "${RELEASE}" != "$(cat ~/.wizarr 2>/dev/null)" ]] || [[ ! -f ~/.wizarr ]]; then
|
||||||
msg_info "Stopping $APP"
|
msg_info "Stopping $APP"
|
||||||
systemctl stop wizarr
|
systemctl stop wizarr
|
||||||
msg_ok "Stopped $APP"
|
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
|
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
|
||||||
msg_ok "Backup Created"
|
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
|
setup_uv
|
||||||
|
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
|
||||||
|
|
||||||
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
$STD uv -q run pybabel compile -d app/translations
|
$STD uv -q run pybabel compile -d app/translations
|
||||||
$STD npm --prefix app/static install
|
$STD npm --prefix app/static install
|
||||||
@ -64,8 +62,6 @@ function update_script() {
|
|||||||
rm -rf "$BACKUP_FILE"
|
rm -rf "$BACKUP_FILE"
|
||||||
rm /tmp/"$RELEASE".zip
|
rm /tmp/"$RELEASE".zip
|
||||||
msg_ok "Cleanup Completed"
|
msg_ok "Cleanup Completed"
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/wizarr_version.txt
|
|
||||||
msg_ok "Update Successful"
|
msg_ok "Update Successful"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
@ -14,21 +14,14 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y sqlite3
|
||||||
curl \
|
|
||||||
sudo \
|
|
||||||
mc \
|
|
||||||
sqlite3
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
setup_uv
|
setup_uv
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
|
||||||
msg_info "Installing ${APPLICATION}"
|
msg_info "Installing ${APPLICATION}"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
fetch_and_deploy_gh_release "wizarr" "wizarrrr/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
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
$STD uv -q run pybabel compile -d app/translations
|
$STD uv -q run pybabel compile -d app/translations
|
||||||
@ -75,14 +68,13 @@ Restart=on-abnormal
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now wizarr.service
|
systemctl enable -q --now wizarr
|
||||||
msg_ok "Created env, start script and service"
|
msg_ok "Created env, start script and service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f /tmp/"$RELEASE".zip
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user