ruk·si

systemd
tmpfiles

Updated at 2022-09-20 01:44

tmpfiles is a systemd extension that creates and cleans temporary files and directories.

Prefer unit directives. Use systemd-tmpfiles only if file lifetime is independent of the service or if you need a more complex setup.

[Service]
RuntimeDirectory=/run/???
StateDirectory=/var/lib/???
CacheDirectory=/var/cache/???
LogsDirectory=/var/logs/???
ConfigurationDirectory=/etc/???

Sources

  • https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-setup.service.html
  • https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html