From cbc9d446f038c98a4b137db324858a3cb53c07d3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 11 Nov 2022 10:25:48 -0500 Subject: [PATCH] Update vaultwarden-update.sh check for old path --- misc/vaultwarden-update.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/vaultwarden-update.sh b/misc/vaultwarden-update.sh index 321e8066..25bc07ca 100644 --- a/misc/vaultwarden-update.sh +++ b/misc/vaultwarden-update.sh @@ -38,8 +38,12 @@ echo -e "${GN} Updating (Building) to ${VAULT} (Patience)... ${CL}" git clone https://github.com/dani-garcia/vaultwarden &>/dev/null cd vaultwarden cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null -cp target/release/vaultwarden /opt/vaultwarden/bin/ - +DIR=/usr/bin/vaultwarden +if [ -d "$DIR" ]; then + cp target/release/vaultwarden /usr/bin/ +else + cp target/release/vaultwarden /opt/vaultwarden/bin/ +fi echo -e "${GN} Starting Vaultwarden ${VAULT}... ${CL}" systemctl start vaultwarden.service sleep 1