/etc/init.d/thttpd buggy; replace with upstart job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
thttpd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: thttpd
When logrotate restarts thttpd, I sometimes find that the thttpd process disappears and is not restarted. I suspect this is due to a bug in /etc/init.d/thttpd, specifically:
$0 stop
$0 start
which will fail if the 'stop' takes more than a second.
Since this script is in need of conversion to upstart anyway, I have done so; see attachment. Feel free to include this upstart script in the next version of this package.
I'm not sure whether the pre-stop line is correct; I'm trying to trigger thttpd to gracefully shut down before upstart kills it, but this might be ineffectual. Someone with more experience of upstart might know how to do this better.
Note that this also requires a change to /etc/logrotate.