[systemd-devel] Systemd user service needs to wait for encrypted $HOME to be decrypted
Lennart Poettering
lennart at poettering.net
Sun Sep 6 03:15:58 PDT 2015
On Fri, 04.09.15 21:10, John (da_audiophile at yahoo.com) wrote:
> Assuming a user has an encrypted $HOME, I need a user service that will:
>
>
> 1) Wait for the $HOME to be decrypted, then run ExecStart, and
> 2) Run ExecStop before the user closes the encryption again.
> 3) Totally ignore the encryption requirement if the user has no
> encryption setup, ie just run normally.
But you want to do all this from the system instance of systemd?
How do you encrypt your $HOME? With LUKS? How is that set up? Only
/home or actually /home/$USER?
> RequiresMountsFor=/home/
This line should actually be all you need to make this work, as long
as /home is on LUKS.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list