On 2016-03-04 14:48 +0100, basti wrote: > I have some errors with systemd and php5-fpm. > I want to create a dir /var/run/php5-fpm where I can place my sockets. > > With the old sysv-init all is fine I just add a "mkdir" in it. > > In systemd there is a bit different. > I try ExecStartPre=/bin/mkdir ... but always get errors that the socket > cant be created. (No such file and directory) /var/run/php5-fpm is not > created. > > Now i try to use the ExecStartPre=/usr/lib/php5/php5-fpm-checkconf and > put my mkdir in there but it seems that this script isn't also working.
Use systemd-tmpfiles to create the directory. To do that, place a file in /etc/tmpfiles.d, say php5-fpm.conf, with the following content: d /run/php5-fpm 0775 root root - - See tmpfiles.d(5). Cheers, Sven