Open vcunat opened 2 years ago
I first encountered the same error log as you did, with NixOS 22.11 this time. After editing my config with your lines of code I still get kind of the same error:
Dez 28 16:29:16 nixos systemd[1]: Started ClamAV daemon (clamd).
Dez 28 16:29:16 nixos clamd[39051]: LibClamAV Error: cli_loaddbdir: No supported database files found in /var/lib/clamav
Dez 28 16:29:16 nixos clamd[39051]: ERROR: Can't open file or directory
Dez 28 16:29:16 nixos systemd[1]: clamav-daemon.service: Main process exited, code=exited, status=1/FAILURE
Dez 28 16:29:16 nixos systemd[1]: clamav-daemon.service: Failed with result 'exit-code'.
Basically saying there is no clamav database. So just after manually firing the update service for clamav systemctl start clamav-freshclam.service
I was able to start the clamav daemon.
Maybe we need a oneshot service to initially create the signature DB for clamav before starting the daemon?
Steps To Reproduce
Set
services.clamav.daemon.enable = true;
and getI did this on fresh NixOS 22.05, but I can't see any related recent change on master either.
Notify maintainers
@robberer @qknight @globin
Workaround
For now I did:
but you may prefer a different way of doing this in the service, e.g. tmpfiles.