mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-08 06:46:28 +00:00
fix(shlink): preserve servers.json across web-client updates (#17023)
CLEAN_INSTALL wipes /opt/shlink-web-client on every `update`, deleting the user's servers.json (and its API key) with no backup, unlike the main /opt/shlink app which already backs up/restores .env and data around its CLEAN_INSTALL. This makes the Web Client lose its configured server(s) on every update. Reuse the existing create_backup/restore_backup helpers around the web-client's CLEAN_INSTALL, mirroring the pattern already used for /opt/shlink.
This commit is contained in:
@@ -61,7 +61,12 @@ function update_script() {
|
||||
|
||||
if [[ -d /opt/shlink-web-client ]]; then
|
||||
if check_for_gh_release "shlink-web-client" "shlinkio/shlink-web-client"; then
|
||||
create_backup /opt/shlink-web-client/servers.json
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shlink-web-client" "shlinkio/shlink-web-client" "prebuild" "latest" "/opt/shlink-web-client" "shlink-web-client_*_dist.zip"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_ok "Updated Web Client"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user