Merge pull request #275080 from SomeoneSerge/feat/munge-systemd
nixos/munge: update the systemd service
This commit is contained in:
commit
15b39c2238
1 changed files with 10 additions and 4 deletions
|
@ -45,19 +45,25 @@ in
|
|||
|
||||
systemd.services.munged = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
wants = [
|
||||
"network-online.target"
|
||||
"time-sync.target"
|
||||
];
|
||||
after = [
|
||||
"network-online.target"
|
||||
"time-sync.target"
|
||||
];
|
||||
|
||||
path = [ pkgs.munge pkgs.coreutils ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}";
|
||||
ExecStart = "${pkgs.munge}/bin/munged --syslog --key-file ${cfg.password}";
|
||||
PIDFile = "/run/munge/munged.pid";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStart = "${pkgs.munge}/bin/munged --foreground --key-file ${cfg.password}";
|
||||
User = "munge";
|
||||
Group = "munge";
|
||||
StateDirectory = "munge";
|
||||
StateDirectoryMode = "0711";
|
||||
Restart = "on-failure";
|
||||
RuntimeDirectory = "munge";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue