Open onlyjob opened 4 years ago
It might be the best to implement systemd-tmpfiles(8) binary that can be called as follows:
systemd-tmpfiles --remove --create /usr/lib/tmpfiles.d/php7.4-fpm.conf
Well, I am usually preparing container images to get them prepared for the actual installer script that will work on them. So the "mkdir" is an expected fixup - there are many other features that systemd supports which can be helped with a workaround.
The systemctl.py script did never have the intention to be a reimplementation of systemd. So this feature request will move to the bottom of my todo list. But I take patches if you have an implementation.
Fair enough, thanks. Of course there are workarounds but I think systemctl aims for compatibility with systemd .service files and management interface. tmpfiles.d
appears to be a part of that interface and supporting it would help to make more .service files work "out of the box" with minimum intervention. Now when systemctl is introduced to Debian, it is easier than ever to make container images and manage services without systemd. We are already so close to a very good level of compatibility -- all thanks to you, @gdraheim. Thank you.
If it helps, newer Debian and Ubuntu package systemd-tmpfiles separately:
https://packages.debian.org/search?keywords=systemd-standalone-tmpfiles https://packages.ubuntu.com/search?keywords=systemd-standalone-tmpfiles
On Debian "unstable"
systemctl start php7.4-fpm
fails, logging the following to/var/log/php7.4-fpm.log
:This is because
systemctl
ignorestmpfiles.d
definitions that are crucial for many systemd services. For instancephp7.4-fpm
package provides the following/usr/lib/tmpfiles.d/php7.4-fpm.conf
:After the following manipulations
systemctl start php7.4-fpm
succeeds:Thanks.