mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
Use temp dir for Web-Vault deployment
Deploy the Web-Vault release into a temporary directory before moving it into /opt/vaultwarden. The change creates a mktemp -d directory, passes that to fetch_and_deploy_gh_release, moves the extracted web-vault into /opt/vaultwarden/web-vault, and removes the temp dir. This prevents partial or mixed artifacts in /opt during the fetch/extract step and keeps the existing ownership/chown behavior.
This commit is contained in:
@@ -75,7 +75,10 @@ function update_script() {
|
|||||||
msg_info "Updating Web-Vault to $WVRELEASE"
|
msg_info "Updating Web-Vault to $WVRELEASE"
|
||||||
rm -rf /opt/vaultwarden/web-vault
|
rm -rf /opt/vaultwarden/web-vault
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds" "prebuild" "latest" "/opt/vaultwarden" "bw_web_*.tar.gz"
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
fetch_and_deploy_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds" "prebuild" "latest" "$TEMP_DIR" "bw_web_*.tar.gz"
|
||||||
|
mv "$TEMP_DIR/web-vault" /opt/vaultwarden/web-vault
|
||||||
|
rm -rf "$TEMP_DIR"
|
||||||
|
|
||||||
chown -R root:root /opt/vaultwarden/web-vault/
|
chown -R root:root /opt/vaultwarden/web-vault/
|
||||||
msg_ok "Updated Web-Vault to ${WVRELEASE}"
|
msg_ok "Updated Web-Vault to ${WVRELEASE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user