summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-03-22 19:21:02 +0100
committerGitHub <noreply@github.com>2017-03-22 19:21:02 +0100
commitb2ba188656f1dcfbd339048da0c4702394a7f904 (patch)
tree4bf77464bed7ac3ed864a30d78969d60258c3ba5 /nixos/modules/services
parent017332fb74935a5f22aa1eda82b4b2f706910150 (diff)
parentb4169bb8dde4a4afa829132703455e4def13a633 (diff)
downloadnixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar.gz
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar.bz2
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar.lz
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar.xz
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.tar.zst
nixlib-b2ba188656f1dcfbd339048da0c4702394a7f904.zip
Merge pull request #24182 from ndowens/munin
munin: 2.0.30 -> 2.0.33; for CVE-2017-6188
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/monitoring/munin.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix
index 364f18e7543d..b8c26a5c89ba 100644
--- a/nixos/modules/services/monitoring/munin.nix
+++ b/nixos/modules/services/monitoring/munin.nix
@@ -193,14 +193,26 @@ in
 
   }) (mkIf cronCfg.enable {
 
-    services.cron.systemCronJobs = [
-      "*/5 * * * * munin ${pkgs.munin}/bin/munin-cron --config ${muninConf}"
-    ];
+    systemd.timers.munin-cron = {
+      description = "batch Munin master programs";
+      wantedBy = [ "timers.target" ];
+      timerConfig.OnCalendar = "*:0/5";
+    };
+
+    systemd.services.munin-cron = {
+      description = "batch Munin master programs";
+      unitConfig.Documentation = "man:munin-cron(8)";
+
+      serviceConfig = {
+        Type = "oneshot";
+        User = "munin";
+        ExecStart = "${pkgs.munin}/bin/munin-cron --config ${muninConf}";
+      };
+    };
 
     system.activationScripts.munin-cron = stringAfter [ "users" "groups" ] ''
       mkdir -p /var/{run,log,www,lib}/munin
       chown -R munin:munin /var/{run,log,www,lib}/munin
     '';
-
   })];
 }