Skip to content

Commit

Permalink
use safer bind mount cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Murray <plugins@omv-extras.org>
  • Loading branch information
ryecoaaron committed Apr 7, 2024
1 parent 1167038 commit 03179f9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions srv/salt/omv/deploy/fstab/91sftp.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ mount_sftp_mountpoint_{{ share.uuid }}:
- mount: True
{% else %}
unmount_sftp_mountpoint_{{ share.uuid }}:
mount.unmounted:
- name: {{ sftppath }}
- device: {{ sfpath }}
- persist: True
cmd.run:
- name: "umount -l '{{ sftppath }}'"

remove_openmediavault_dir_{{ share.uuid }}:
file.absent:
- name: {{ sftppath }}
cmd.run:
- name: "rmdir '{{ sftppath }}'"
{% endif %}
{% endfor %}

0 comments on commit 03179f9

Please sign in to comment.