mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 02b1066efa142a6e66aa58e6642837b700a73945
parent 29309f24d608a227e18c4340c32b16518cf33836
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sun,  3 May 2020 10:38:38 +0200

also close remote volumes

Diffstat:
luks_umount | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/luks_umount b/luks_umount @@ -1,8 +1,15 @@ #!/bin/bash VOLUME="$1" +MACHINE="$2" +if [ -z $MACHINE ] +then + COMMAND="" +else + COMMAND="ssh $MACHINE" +fi MOUNTPOINT="/mnt/$VOLUME" -sudo umount "$MOUNTPOINT" -sudo cryptsetup close "$VOLUME" +$COMMAND sudo umount "$MOUNTPOINT" +$COMMAND sudo cryptsetup close "$VOLUME"