mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-26 22:27:15 +02:00
refactor(ct): migrate manual update backups to create_backup (batch 1)
Replace ad-hoc mv/cp .bak patterns with create_backup/restore_backup across 58 update scripts so failed updates can roll back via the shared ERR trap. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-6
@@ -34,16 +34,12 @@ function update_script() {
|
||||
systemctl stop web-check
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Creating backup"
|
||||
mv /opt/web-check/.env /opt
|
||||
msg_ok "Created backup"
|
||||
create_backup /opt/web-check/.env
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "web-check" "Lissy93/web-check" "tarball"
|
||||
restore_backup
|
||||
|
||||
msg_info "Restoring backup"
|
||||
mv /opt/.env /opt/web-check
|
||||
msg_ok "Restored backup"
|
||||
|
||||
msg_info "Building Web-Check"
|
||||
cd /opt/web-check
|
||||
|
||||
Reference in New Issue
Block a user