I’m trying to make a decryption software for my NAS, so that it automatically mounts all drives and decrypts them.
But, I need to know if the sudo cryptsetup luksOpen /dev/blahblahblah dev0
exists after it had attempted to open it.
How do I detect that in Bash? I’ve attempted:
if [ -e /dev/mapper/dev0 ]; then
Then but that didn’t seem to work. Anybody have any ideas?