Skip to content

Commit

Permalink
nixos/clamav: fix daemon/updater services toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Oct 1, 2018
1 parent 94de259 commit f8d681a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nixos/modules/services/security/clamav.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ in
environment.etc."clamav/freshclam.conf".source = freshclamConfigFile;
environment.etc."clamav/clamd.conf".source = clamdConfigFile;

systemd.services.clamav-daemon = optionalAttrs cfg.daemon.enable {
systemd.services.clamav-daemon = mkIf cfg.daemon.enable {
description = "ClamAV daemon (clamd)";
after = optional cfg.updater.enable "clamav-freshclam.service";
requires = optional cfg.updater.enable "clamav-freshclam.service";
Expand All @@ -116,7 +116,7 @@ in
};
};

systemd.timers.clamav-freshclam = optionalAttrs cfg.updater.enable {
systemd.timers.clamav-freshclam = mkIf cfg.updater.enable {
description = "Timer for ClamAV virus database updater (freshclam)";
wantedBy = [ "timers.target" ];
timerConfig = {
Expand All @@ -125,7 +125,7 @@ in
};
};

systemd.services.clamav-freshclam = optionalAttrs cfg.updater.enable {
systemd.services.clamav-freshclam = mkIf cfg.updater.enable {
description = "ClamAV virus database updater (freshclam)";
restartTriggers = [ freshclamConfigFile ];

Expand Down

0 comments on commit f8d681a

Please sign in to comment.