Get periodic scan to work.

This commit is contained in:
Raphaël Numbus
2026-03-02 14:45:59 +01:00
parent 331b686bae
commit 501383bc8d
+5 -7
View File
@@ -66,17 +66,15 @@ in
};
systemd.services.clamav-periodic-scan = mkIf (onAccessPaths != []) {
description = "ClamAV periodic scan of service data directories";
after = [ "clamav-daemon.service" ];
description = "Periodic ClamAV virus scan";
after = [ "clamav-daemon.service" "clamav-freshclam.service" ];
requires = [ "clamav-daemon.service" ];
wants = [ "clamav-freshclam.service" ];
onFailure = [ "clamav-virus-notify.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.clamav}/bin/clamdscan --verbose --multiscan --move=/quarantine ${lib.escapeShellArgs onAccessPaths}";
User = "clamav";
Group = "clamav";
SupplementaryGroups = [ "users" ];
TimeoutStartSec = "infinity";
ExecStart = "${pkgs.clamav}/bin/clamdscan --multiscan --fdpass --infected --allmatch --move=/quarantine ${lib.escapeShellArgs onAccessPaths}";
Slice = "system-clamav.slice";
};
};