Get periodic scan to work.
This commit is contained in:
@@ -66,17 +66,15 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.clamav-periodic-scan = mkIf (onAccessPaths != []) {
|
systemd.services.clamav-periodic-scan = mkIf (onAccessPaths != []) {
|
||||||
description = "ClamAV periodic scan of service data directories";
|
description = "Periodic ClamAV virus scan";
|
||||||
after = [ "clamav-daemon.service" ];
|
after = [ "clamav-daemon.service" "clamav-freshclam.service" ];
|
||||||
requires = [ "clamav-daemon.service" ];
|
requires = [ "clamav-daemon.service" ];
|
||||||
|
wants = [ "clamav-freshclam.service" ];
|
||||||
onFailure = [ "clamav-virus-notify.service" ];
|
onFailure = [ "clamav-virus-notify.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.clamav}/bin/clamdscan --verbose --multiscan --move=/quarantine ${lib.escapeShellArgs onAccessPaths}";
|
ExecStart = "${pkgs.clamav}/bin/clamdscan --multiscan --fdpass --infected --allmatch --move=/quarantine ${lib.escapeShellArgs onAccessPaths}";
|
||||||
User = "clamav";
|
Slice = "system-clamav.slice";
|
||||||
Group = "clamav";
|
|
||||||
SupplementaryGroups = [ "users" ];
|
|
||||||
TimeoutStartSec = "infinity";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user