[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script

On Monday, 13 March 2017 08:07:01 CET Sergio Gelato wrote:
> Now that apache2 includes a native systemd unit, it may be prudent to stop
> assuming that /etc/init.d/apache2 exists. (It's still distributed as part
> of the package, but since it's a configuration file system administrators
> are free to delete it.)


> 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.

Reply to: