mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-22 13:52:53 +02:00
Standardize CT update backup handling (#15937)
This commit is contained in:
committed by
GitHub
parent
d8efbd04d8
commit
bd3e3bd5f9
+2
-12
@@ -35,21 +35,11 @@ function update_script() {
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
if [[ -f /opt/fladder/assets/config/config.json ]]; then
|
||||
msg_info "Backing up configuration"
|
||||
cp /opt/fladder/assets/config/config.json /tmp/fladder_config.json.bak
|
||||
msg_ok "Configuration backed up"
|
||||
fi
|
||||
create_backup /opt/fladder/assets/config/config.json
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Fladder" "DonutWare/Fladder" "prebuild" "latest" "/opt/fladder" "Fladder-Web-*.zip"
|
||||
|
||||
if [[ -f /tmp/fladder_config.json.bak ]]; then
|
||||
msg_info "Restoring configuration"
|
||||
mkdir -p /opt/fladder/assets/config
|
||||
cp /tmp/fladder_config.json.bak /opt/fladder/assets/config/config.json
|
||||
rm -f /tmp/fladder_config.json.bak
|
||||
msg_ok "Configuration restored"
|
||||
fi
|
||||
restore_backup
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start nginx
|
||||
|
||||
Reference in New Issue
Block a user