Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tmp file dir to enable pid creation between reboots #188

Closed
mmeloni opened this issue May 11, 2020 · 0 comments
Closed

Create tmp file dir to enable pid creation between reboots #188

mmeloni opened this issue May 11, 2020 · 0 comments
Labels
back-end bug Something isn't working

Comments

@mmeloni
Copy link
Contributor

mmeloni commented May 11, 2020

Create tmp file dir at every reboot
Correct docs

With the adoption of systemd as of 15.04, there is now a centralized mechanism for the creation of temporary files and directories such as these. A service wishing to use this method can remove mkdir commands in its own startup script and instead place a .conf file in /etc/tmpfiles.d, /run/tmpfiles.d, or /usr/lib/tmpfiles.d, with Ubuntu services seeming to prefer the last option. For example, my system now has:

$ egrep -r /var/run /usr/lib/tmpfiles.d

/usr/lib/tmpfiles.d/var.conf:L /var/run - - - - ../run
/usr/lib/tmpfiles.d/sudo.conf:d /var/run/sudo 0711 root root
/usr/lib/tmpfiles.d/sudo.conf:D /var/run/sudo/ts 0700 root root
/usr/lib/tmpfiles.d/postgresql.conf:d /var/run/postgresql 2775 postgres postgres - -
/usr/lib/tmpfiles.d/sshd.conf:d /var/run/sshd 0755 root root
/usr/lib/tmpfiles.d/screen-cleanup.conf:d /var/run/screen 0775 root utmp
The d means to create a directory if it doesn't already exist, after that is the path, and the rest are the permissions, user, and group. These directories will be created regardless of whether the corresponding service is ever started.

http://manpages.ubuntu.com/manpages/xenial/en/man5/tmpfiles.d.5.html

@mmeloni mmeloni added back-end bug Something isn't working labels May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant