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:
CanbiZ (MickLesk)
2026-02-02 17:14:48 +01:00
parent d7872a8240
commit c612bfefcd

View File

@@ -74,11 +74,9 @@ function update_script() {
msg_info "Updating Web-Vault to $WVRELEASE"
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" "$TEMP_DIR" "bw_web_*.tar.gz"
mv "$TEMP_DIR/web-vault" /opt/vaultwarden/web-vault
rm -rf "$TEMP_DIR"
fetch_and_deploy_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds" "prebuild" "latest" "/opt/vaultwarden/web-vault" "bw_web_*.tar.gz"
chown -R root:root /opt/vaultwarden/web-vault/
msg_ok "Updated Web-Vault to ${WVRELEASE}"