Hi Stefan, Excerpts from Stefan Bühler's message of 2011-12-17 12:32:11 +0000: > If i (as user) configure php-fpm to use that directory (by setting the > socket paths), i need an easy way to make sure it exists. > same problem if i'd be using /var/run/php-fpm/..., but it makes sense to > put all sockets that are going to be used by lighttpd in > /var/run/lighttpd/, and seeing that /var/run/lighttpd/ already exists, > why would I ever think using that directory might be a problem? > > And there is no need to run lighttpd - perhaps sometimes you only want > to run the backend (parallel start for example), so a runtime dependency > is wrong too. > > And there should be only one place that creates the directory, and it > should be easily configurable (+1 for /etc/tmpfiles.d/) I see.
> (Imho the core system should manage this automatically for all > directories that are installed from packages in /var/run/ to ensure old > packages keep working; configuring it with dpkg-statoverride as always). I agree. > hm, right. the debian init script creates that directory (and overwrites > permissions, very bad style). > It still is just an ugly workaround, and i'd like to see a proper fix > for it, not more workarounds. Me too. But this is a separate issue, and for now just providing the same functionality that the init-script provides will bring us forward in systemd integration. Waiting for a perfect solution to cover this and other problems won’t :). > Hm. I think is isn't worth it to check for the syntax. You don't gain > much from it, but you might end up paying too much for it (running all > the include_shell things and so on). Well, I’ve been bitten multiple times by changing my config and lighttpd not coming up properly afterwards, so indeed the check does not seem to help a lot. However, having a check which catches some errors is better than not having checks at all. And maybe upstream can make the check more useful in the future? If upstream thinks the check is not worth it, what about making the check a no-op and removing it from the distribution init-scripts/systemd files? > I guess ExecStartPre is always called before starting the service, right? Correct. > Actually, the init script was changed, and "reload" does a restart now. > "reopen-logs" is used for sending HUP. I see. So then scripts need to be changed anyways. As systemctl provides a reload-or-restart action, we can drop the ExecReload line. We should also change /etc/logrotate.d/lighttpd like this: postrotate if [ -x /bin/systemctl ]; then \ /bin/systemctl kill --signal=SIGHUP lighttpd.service > /dev/null 2>&1; \ elif [ -x /usr/sbin/invoke-rc.d ]; then \ invoke-rc.d lighttpd reopen-logs > /dev/null 2>&1; \ else \ /etc/init.d/lighttpd reopen-logs > /dev/null 2>&1; \ fi; \ endscript I have attached the modified debian/lighttpd.logrotate and lighttpd.service. Best regards, Michael
lighttpd.service
Description: Binary data
lighttpd.logrotate
Description: Binary data