From ded4bba04de82c5a5c6cb56493a7359819cc94e3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:22:20 +0200 Subject: [PATCH] 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 --- ct/glance.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ct/glance.sh b/ct/glance.sh index 436de8c54..3207a2f7a 100644 --- a/ct/glance.sh +++ b/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"