diff --git a/roles/bitwarden_rs/templates/post-backup.sh.j2 b/roles/bitwarden_rs/templates/post-backup.sh.j2 index 3166c61..35286d4 100644 --- a/roles/bitwarden_rs/templates/post-backup.sh.j2 +++ b/roles/bitwarden_rs/templates/post-backup.sh.j2 @@ -1,4 +1,4 @@ #!/bin/bash -e rm -f {{ bitwarden_root_dir }}/backup/* -umount /home/lbkp/bitwarden +umount /home/lbkp/bitwarden_rs diff --git a/roles/bitwarden_rs/templates/pre-backup.sh.j2 b/roles/bitwarden_rs/templates/pre-backup.sh.j2 index db61879..95fa847 100644 --- a/roles/bitwarden_rs/templates/pre-backup.sh.j2 +++ b/roles/bitwarden_rs/templates/pre-backup.sh.j2 @@ -14,4 +14,4 @@ cp {{ bitwarden_root_dir }}/data/rsa* {{ bitwarden_root_dir }}/backup/ {% else %} sqlite3 {{ bitwarden_root_dir }}/data/db.sqlite3 ".backup '{{ bitwarden_root_dir }}/backup/db.sqlite3'" {% endif %} -mount -o bind,ro {{ bitwarden_root_dir }}/backup/ /home/lbkp/bitwarden_rs/ +mountpoint -q /home/lbkp/bitwarden_rs/ || mount -o bind,ro {{ bitwarden_root_dir }}/backup/ /home/lbkp/bitwarden_rs/