commit 80070f4e20ec228b1b74bec8e7af401a9f0a3f58 parent 902df9aaa71f09c0ce86ba7265e929b134cc8f8b Author: Antoine Amarilli <a3nm@a3nm.net> Date: Fri, 12 Aug 2016 02:12:02 +0200 luks_mount and luks_umount Diffstat:
luks_mount | | | 10 | ++++++++++ |
luks_umount | | | 10 | ++++++++++ |
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/luks_mount b/luks_mount @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +VOLUME="$1" +KEY="$HOME/credentials/$VOLUME.key" + +sudo cryptsetup luksOpen --key-file "$KEY" $(duuid "$VOLUME") "$VOLUME" +sudo mount "/dev/mapper/$VOLUME" "/mnt/$VOLUME" + diff --git a/luks_umount b/luks_umount @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +VOLUME="$1" +MOUNTPOINT="/mnt/$VOLUME" + +sudo umount "$MOUNTPOINT" +sudo cryptsetup luksClose "$VOLUME" +