mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-16 07:41:11 +02:00
fix(glance): preserve glance.yml across updates
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:
@@ -34,8 +34,20 @@ function update_script() {
|
|||||||
systemctl stop glance
|
systemctl stop glance
|
||||||
msg_ok "Stopped Service"
|
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"
|
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"
|
msg_info "Starting Service"
|
||||||
systemctl start glance
|
systemctl start glance
|
||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
|
|||||||
Reference in New Issue
Block a user