[pkg-lighttpd] Bug#652442: lighttpd: please include systemd service file

Stefan Bühler stbuehler at lighttpd.net
Sat Dec 17 12:00:17 UTC 2011


Hi Michael,

On 12/17/2011 12:27 PM, Michael Stapelberg wrote:
> Hi Stefan,
>
> Thanks for your quick reply.
>
> Excerpts from Stefan Bühler's message of 2011-12-17 11:18:14 +0000:
>> is systemd still needed for /etc/tmpfiles.d/lighttpd.conf ?
>>
>> If yes i think it should *not* be used, as it only works if you are
>> using systemd, which is a wrong dependency here - it must work with all
>> init systems (see #636339).
> I’m not sure why providing this file would add a dependency on systemd:
>
>   • If the user uses sysvinit, the init-script will create the folder.
>   • If the user uses systemd, its tmpfiles.d-mechanism will create the folder.
>
> So, this seems like a completely different problem to me. Could you elaborate?

And if a different sysvinit script, that uses the same directory for 
temporary sockets for example like php-fpm, runs before the lighttpd 
one, the directory is missing, and it will fail.
Of course you could add more dependencies and so on, but this is just 
the wrong way to ensure a directory exists.

And as php-fpm wouldn't default to that path, but a user might want to 
use that path for additional security (so users can't list all sockets), 
the distribution provided files won't have a dependency, and the user 
probably won't get it right.

Don't get me wrong: I actually like the tmpfiles.d thing. I just think 
it needs a more generic handling than systemd, iow all init systems must 
create those directories before doing anything else (well, after 
mounting /run ofc).

>> The /lib/systemd/system/lighttpd.service looks simple enough that i
>> might include it upstream (if you don't see any problem with that).
> Cool, feel free to do that. I didn’t send an email with an upstream inclusion
> request since it seems like lighttpd doesn’t ship an init-file either, but
> providing that file is definitely a good thing for other distributions.

I think we actually ship some init scripts, but they depend on the 
distribution you are using.
The systemd service looks simple enough that it should work on all dists.

Now i have two questions for the systemd service itself :)
a) ExecStartPre - is that useful? lighttpd -t only checks the basic 
syntax, not whether the config options actually exist or whether they 
have the right structure (strings, ints, bools, lists of ...) and so on.
b) SIGHUP only reopens the log files, it does not reload the config. Is 
this the right thing for ExecReload?

Regards,
Stefan





More information about the pkg-lighttpd-maintainers mailing list