Bug 720210 - Provide native systemd unit file for lighttpd
Provide native systemd unit file for lighttpd
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lighttpd (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthias Saou
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: SysVtoSystemd
  Show dependency treegraph
 
Reported: 2011-07-10 20:06 EDT by Jóhann B. Guðmundsson
Modified: 2012-04-18 09:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: 1.4.28-3.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-17 11:45:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Native systemd service file for lighttpd (293 bytes, text/plain)
2011-07-10 20:08 EDT, Jóhann B. Guðmundsson
no flags Details

  None (edit)
Description Jóhann B. Guðmundsson 2011-07-10 20:06:22 EDT
Description of problem:

https://fedoraproject.org/wiki/Features/SysVtoSystemd

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Matthias Saou 2011-07-11 14:48:38 EDT
Pushed to Rawhide, though untested yet until I have a systemd enabled machine available.
Comment 3 Honza Horak 2011-10-24 07:17:32 EDT
lighttpd doesn't start every-time with new systemd (systemd-35-1.fc16 and systemd-37-2.fc16 tested on F16 in VM, although it works on systemd-26-9 on F15). It seems like it starts correctly only the first time after system daemon is reload, so it is a race condition.

It seems to me like the PID file is not created fast enough, because systemd reports: "Failed to read PID file /var/run/lighttpd.pid after start. The service might be broken." If I run the daemon manually, the PID file is created right.

I'm proposing an easy patch that fixes the failure for me -- just don't demonize the daemon:
--- a/lighttpd.service
+++ b/lighttpd.service
@@ -3,10 +3,9 @@ Description=Lightning Fast Webserver With Light System Requirements
 After=syslog.target network.target
 
 [Service]
-Type=forking
 PIDFile=/var/run/lighttpd.pid
 EnvironmentFile=-/etc/sysconfig/lighttpd
-ExecStart=/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
+ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
 
 [Install]
 WantedBy=multi-user.target
Comment 4 Jan ONDREJ 2011-11-18 08:28:10 EST
Same problem here. Honza's patch work for me.
Comment 5 Michael Tremer 2011-11-27 11:11:22 EST
+1 for the change from Honza.
Comment 6 Gwyn Ciesla 2012-02-13 14:58:01 EST
Mattias, any objection to my committing Honza's changes?
Comment 7 Gwyn Ciesla 2012-03-14 12:24:45 EDT
Ping?
Comment 8 Gwyn Ciesla 2012-04-17 11:45:18 EDT
Done.
Comment 9 Matthias Saou 2012-04-18 09:19:43 EDT
Sorry for missing this. Thanks Jon for fixing this.
Comment 10 Gwyn Ciesla 2012-04-18 09:25:20 EDT
No worries, anytime.  If you have any other packages needing this you'd like me to do, email me.

Note You need to log in before you can comment on or make changes to this bug.