Browse Source

encrypted mount

master
katherine 10 months ago
parent
commit
2e17e24b5a
  1. 14
      .zshrc-linux-desktop

14
.zshrc-linux-desktop

@ -22,3 +22,17 @@ if [[ $(whence timew) != "" ]] then
alias tt='timew track'
alias tu='timew undo'
fi
if [[ -f $HOME/mount/enc.iso && $(whence cryptsetup) ]] then
emount() {
mkdir -p $HOME/enc || return 1
sudo cryptsetup luksOpen $HOME/mount/enc.iso enc || { rmdir $HOME/enc; return 1 }
sudo mount /dev/mapper/enc $HOME/enc || { sudo cryptsetup luksClose enc; rmdir $HOME/enc; return 1 }
}
eumount() {
[[ -d $HOME/enc ]] && sudo umount $HOME/enc
sudo cryptsetup luksClose enc
[[ -d $HOME/enc ]] && rmdir $HOME/enc
}
fi

Loading…
Cancel
Save