Merge pull request #38020 from ryantm/monit-reload

nixos/monit: restart if config changes
This commit is contained in:
Wout Mertens 2018-03-29 08:22:54 +02:00 committed by GitHub
commit 97f93789a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,16 +26,10 @@ in
environment.systemPackages = [ pkgs.monit ];
environment.etc = [
{
source = pkgs.writeTextFile {
name = "monitrc";
text = config.services.monit.config;
};
target = "monitrc";
mode = "0400";
}
];
environment.etc."monitrc" = {
text = config.services.monit.config;
mode = "0400";
};
systemd.services.monit = {
description = "Pro-active monitoring utility for unix systems";
@ -48,6 +42,8 @@ in
KillMode = "process";
Restart = "always";
};
restartTriggers = [ config.environment.etc."monitrc".source ];
};
};
}