mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
Fetch Web-Vault directly to target dir
Simplify the Web-Vault update flow by creating /opt/vaultwarden/web-vault and calling fetch_and_deploy_gh_release with that path as the deployment target. Removes temporary directory creation, move and cleanup (mktemp/mv/rm -rf) and ensures the destination exists before downloading. Ownership and the success message are preserved.
This commit is contained in:
@@ -74,11 +74,9 @@ 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
|
||||||
|
mkdir -p /opt/vaultwarden/web-vault
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
fetch_and_deploy_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds" "prebuild" "latest" "/opt/vaultwarden/web-vault" "bw_web_*.tar.gz"
|
||||||
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