1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

revert useless backup/restore operation

This commit is contained in:
Jeremy Vagnet 2020-04-27 12:16:30 +02:00
parent 795b6a85db
commit 88ba5261a1

View file

@ -139,12 +139,6 @@ then
sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release
popd popd
# Backup config file
tmpdir="$(mktemp -d)"
if [ -f $final_path/live/bitwarden_rs.env ]; then
cp -af "$final_path/live/bitwarden_rs.env" "$tmpdir/."
fi
# Remove old generated files before copying the new ones # Remove old generated files before copying the new ones
ynh_secure_remove --file="$final_path/live/build" ynh_secure_remove --file="$final_path/live/build"
ynh_secure_remove --file="$final_path/live/deps" ynh_secure_remove --file="$final_path/live/deps"
@ -153,13 +147,7 @@ then
# Install bitwarden_rs # Install bitwarden_rs
cp -a "$final_path"/build/target/release/. "$final_path"/live/. cp -a "$final_path"/build/target/release/. "$final_path"/live/.
# Restore config file # Remove build files and rustup
if [ -f $tmpdir/bitwarden_rs.env ]; then
cp -af "$tmpdir/bitwarden_rs.env" "$final_path/live/."
fi
ynh_secure_remove --file="$tmpdir"
# Remove build files and rustup
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
ynh_secure_remove --file="$final_path/.cargo" ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup" ynh_secure_remove --file="$final_path/.rustup"