A way for an Upstart event to be sent whenever ecryptfs homedir mounted/unmounted?
Posted
by
David Olivier
on Ask Ubuntu
See other posts from Ask Ubuntu
or by David Olivier
Published on 2011-11-18T17:16:53Z
Indexed on
2011/11/18
18:03 UTC
Read the original article
Hit count: 542
I have an encrypted homedir (ecryptfs) and I'm wanting to run a private mysql daemon with the database files in my homedir. The daemon should be started whenever the homedir is mounted, and stopped before the homedir is unmounted. It seems I have to write an Upstart script, which doesn't seem too hard; the problem is triggering it.
Is there already any Upstart event that is sent on these occasions? Or must I insert an "initctl emit" somewhere? Where? It seems the encrypted homedir is mounted whenever I either open my GUI session or ssh to my account. Is there a common place in these two processes where I might insert code?
(I don't want to patch and compile any C code, just insert maybe a few lines somewere.)
David
© Ask Ubuntu or respective owner