[systemd-devel] Scheduling emptyings of specific directories

Andrei Borzenkov arvidjaar at gmail.com
Fri Jun 3 15:40:45 UTC 2016


03.06.2016 16:06, One Infinite Loop пишет:
> It would be great if I could empty directories (creating a .conf file
> in /etc/tmpfiles.d) but not at boot time, but before shutting
> down/rebooting the pc. I am using systemd 229. Thanks in advance.
> 
> 

Just create a oneshot, RemainAfterExit service with empty ExecStart and
put your call to systemd-tmpfiles into ExecStop (or probablyl ExecStopPost).


More information about the systemd-devel mailing list