mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-19 23:36:35 +00:00
Standardize CT update backup handling (#15937)
This commit is contained in:
+3
-10
@@ -35,13 +35,12 @@ function update_script() {
|
||||
systemctl stop xyops
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
cp -r /opt/xyops/data /opt/xyops_data_backup
|
||||
cp -r /opt/xyops/conf /opt/xyops_conf_backup
|
||||
msg_ok "Backed up Data"
|
||||
create_backup /opt/xyops/data /opt/xyops/conf
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "xyops" "pixlcore/xyops" "tarball"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Rebuilding Application"
|
||||
cd /opt/xyops
|
||||
$STD npm install
|
||||
@@ -49,12 +48,6 @@ function update_script() {
|
||||
chmod 644 /opt/xyops/node_modules/useragent-ng/lib/regexps.js
|
||||
msg_ok "Rebuilt Application"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
cp -r /opt/xyops_data_backup/. /opt/xyops/data
|
||||
cp -r /opt/xyops_conf_backup/. /opt/xyops/conf
|
||||
rm -rf /opt/xyops_data_backup /opt/xyops_conf_backup
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start xyops
|
||||
msg_ok "Started Service"
|
||||
|
||||
Reference in New Issue
Block a user