[Pkg-clamav-devel] Bug#788652: Logrotate fails if clamav-freshclam is not running as a daemon under systemd

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Jun 14 20:18:52 UTC 2015


Control: tag -1 pending

Hi John,

On 13.06.2015 21:45, John Zaitseff wrote:
> Thanks for packaging ClamAV for Debian!  There is a problem,
> however, with the file /etc/logrotate.d/clamav-freshclam under
> systemd: it fails if clamav-freshclam is not running as a daemon
> (such as being run via a cron job, as is the case on my system).
> 
> In particular, if the daemon is not active, "systemctl -q is-active"
> returns an error value of 3, which causes the script to fail.
> 
> The solution is to add "|| :" to the end of that line.  The attached
> patch does exactly that.  Could you please apply it.

Thanks for noticing this and sending a patch!
(It doesn't apply to the packaging, because the logrotate script is
created from the postinst script, but the intention counts.)

> I'm guessing systemd is still new to all of us---certainly to me!

Actually this also affects clamav-daemon and its init script could
also fail (if it is used in supervised mode).
So I also added "|| true" for the init scripts, see commit [1].

Best regards,
Andreas


1: https://anonscm.debian.org/cgit/pkg-clamav/clamav.git/commit/?id=1de4c30e7388f365b7e944770323a6347f656602



More information about the Pkg-clamav-devel mailing list