Created
July 21, 2023 11:03
-
-
Save radupotop/41b2c2442d3e1766f42ee28d24e83229 to your computer and use it in GitHub Desktop.
A basic Gocryptfs mount helper.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A basic Gocryptfs mount helper. | |
MOUNT_NAME=$(realpath "$1") | |
BASE_NAME=$(basename "$MOUNT_NAME") | |
MOUNT_DIR="$HOME/mnt/$BASE_NAME" | |
logger "Mounting $MOUNT_NAME to $MOUNT_DIR" | |
mkdir "$MOUNT_DIR" | |
/usr/bin/gocryptfs -fg -idle 10m -extpass "zenity --password --title $BASE_NAME" "$MOUNT_NAME" "$MOUNT_DIR" | |
rmdir "$MOUNT_DIR" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment