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 = {
|
systemd.services.munged = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
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 ];
|
path = [ pkgs.munge pkgs.coreutils ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}";
|
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 0400 ${cfg.password}";
|
||||||
ExecStart = "${pkgs.munge}/bin/munged --syslog --key-file ${cfg.password}";
|
ExecStart = "${pkgs.munge}/bin/munged --foreground --key-file ${cfg.password}";
|
||||||
PIDFile = "/run/munge/munged.pid";
|
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
|
||||||
User = "munge";
|
User = "munge";
|
||||||
Group = "munge";
|
Group = "munge";
|
||||||
StateDirectory = "munge";
|
StateDirectory = "munge";
|
||||||
StateDirectoryMode = "0711";
|
StateDirectoryMode = "0711";
|
||||||
|
Restart = "on-failure";
|
||||||
RuntimeDirectory = "munge";
|
RuntimeDirectory = "munge";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue