Skip to content

Instantly share code, notes, and snippets.

@radupotop
Created July 21, 2023 11:03
Show Gist options
  • Save radupotop/41b2c2442d3e1766f42ee28d24e83229 to your computer and use it in GitHub Desktop.
Save radupotop/41b2c2442d3e1766f42ee28d24e83229 to your computer and use it in GitHub Desktop.
A basic Gocryptfs mount helper.
#!/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