Skip to content

Commit ded4bba

Browse files
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>
1 parent 5b6f8e2 commit ded4bba

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ct/glance.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,20 @@ function update_script() {
3434
systemctl stop glance
3535
msg_ok "Stopped Service"
3636

37+
if [[ -f /opt/glance/glance.yml ]]; then
38+
msg_info "Backing up glance.yml"
39+
cp /opt/glance/glance.yml /tmp/glance.yml.bak
40+
msg_ok "Backed up glance.yml"
41+
fi
42+
3743
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-amd64.tar.gz"
3844

45+
if [[ -f /tmp/glance.yml.bak ]]; then
46+
msg_info "Restoring glance.yml"
47+
mv /tmp/glance.yml.bak /opt/glance/glance.yml
48+
msg_ok "Restored glance.yml"
49+
fi
50+
3951
msg_info "Starting Service"
4052
systemctl start glance
4153
msg_ok "Started Service"

0 commit comments

Comments
 (0)