Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script
* Stefan Fritsch [2017-03-13 22:14:23 +0100]:
> On Monday, 13 March 2017 08:07:01 CET Sergio Gelato wrote:
> > The postrotate script in /etc/logrotate.d/apache2 invokes
> > /etc/init.d/apache2 directly; according to section 9.3.3 of the Debian
> > policy it should be using invoke-rc.d instead.
> That section only talks about the package scripts (postinst, etc.). I don't
> think it is applicable for logrotate scripts.
> The reason I didn't use invoke-rc.d is that it obeys runlevel constraints,
> which is not wanted in the logrotate script. But it seems invoke-rc.d has this
> limitation only for "start", not for "status" and "reload". So switching to
> invoke-rc.d should be fine.
What about the policy-rc.d mechanism? Is it wanted or unwanted in this case?
An alternative, if invoke-rc.d really is unsuitable, would be to use service.