mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-01 13:19:35 +02:00
fix(glance): preserve glance.yml across updates (#14845)
CLEAN_INSTALL wipes /opt/glance without restoring user config; back up and restore glance.yml around the prebuild deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
GitHub
parent
5b6f8e2674
commit
ded4bba04d
12
ct/glance.sh
12
ct/glance.sh
@@ -34,8 +34,20 @@ function update_script() {
|
||||
systemctl stop glance
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
if [[ -f /opt/glance/glance.yml ]]; then
|
||||
msg_info "Backing up glance.yml"
|
||||
cp /opt/glance/glance.yml /tmp/glance.yml.bak
|
||||
msg_ok "Backed up glance.yml"
|
||||
fi
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-amd64.tar.gz"
|
||||
|
||||
if [[ -f /tmp/glance.yml.bak ]]; then
|
||||
msg_info "Restoring glance.yml"
|
||||
mv /tmp/glance.yml.bak /opt/glance/glance.yml
|
||||
msg_ok "Restored glance.yml"
|
||||
fi
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start glance
|
||||
msg_ok "Started Service"
|
||||
|
||||
Reference in New Issue
Block a user