Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to have a script automatically triggered when a truecrypt volume is mounted or dismounted? I don't mean a script to actually perform the mount or dismount, I want scripts that can react to truecrypt mounting or dismounting a volume.

Specifically, I've got MySQL databases hosted on a truecrypt volume. I've got truecrypt setup to dismount when I logout or lock my desktop session, but MySQL doesn't react well to the database disappearing out from under it. I'd like to have scripts fired on dismount to stop mysqld and start it on mount.

(Windows 7, TrueCrypt 7.0)

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I know you don't want a script to perform the mounting, but your best bet might be to make a batch script that DOES perform the mounting, but also performs the necessary MySQL commands (same in reverse). Batch scripts triggered by a Truecrypt mounting is beyond my expertise.

share|improve this answer
    
This works on Linux. –  viking Jun 16 '11 at 18:13

You can use autoit to make a script that runs a batch file with your changes when it detects logging out or locking your computer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.