/etc/init.d/thttpd buggy; replace with upstart job

Bug #717325 reported by Malcolm Scott
6
This bug affects 1 person
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
                sleep 1
                $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.d/thttpd since invoke-rc.d will no longer work; replace the last few lines with "service thttpd restart > /dev/null 2>&1".

Revision history for this message
Malcolm Scott (malcscott) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.