Zend certified PHP/Magento developer

How to detect if “/dev/mapper/dev0” exists in Bash?

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?