Bug 12104 - Freshclam starts before network is online (systemd)
Freshclam starts before network is online (systemd)
Status: RESOLVED FIXED
Product: ClamAV
Classification: ClamAV
Component: freshclam
stable
x86_64 GNU/Linux
: P3 normal
: 0.101.0
Assigned To: Micah Snyder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-19 04:42 EDT by Patrick
Modified: 2019-07-05 16:31 EDT (History)
1 user (show)

See Also:
QA Contact:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick 2018-04-19 04:42:19 EDT
The freshclam systemd service file (clamav-freshclam.service) contains no network-online dependency, causing freshclam to be started before the network is online. This in turn causes the first virus database update to fail.

To solve the problem, the following lines should be added to the [Unit] section of clamav-freshclam.service:
Wants=network-online.target
After=network-online.target
Comment 1 Micah Snyder 2018-05-15 10:02:14 EDT
Thanks for the report, and suggestion.  Will investigate soon.
Comment 2 Micah Snyder 2019-07-05 16:31:19 EDT
Patrick,

We've added the lines that you recommended:
https://github.com/Cisco-Talos/clamav-devel/commit/0ed66f1384df13c36a04947886294dc5cc7a44c4

Thanks for submitting the issue.

Regards,
Micah