.local/bin/encfsw: Set --extpass so it works in SLY.

master
Pierre Neidhardt 2021-01-12 18:48:42 +01:00
parent 3a2d08fae1
commit 26ab1fc21c
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ mount() {
MOUNTPOINT="${SOURCE}_decrypted"
mkdir -p "$MOUNTPOINT"
if [ -z "$PASS" ]; then
encfs "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
## REVIEW: Only set extpass if no PTY is connected?
encfs --extpass=$(which lxqt-openssh-askpass 2>/dev/null) "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
else
echo "$PASS" | encfs --stdinpass "$SOURCE" "$MOUNTPOINT" || rmdir "$MOUNTPOINT"
fi