nixos.openntpd: don't spam systemd journal
Starting `ntpd` with the `-d` option spams the systemd journal. Instead, let the server fork.
This commit is contained in:
parent
ffcb272e01
commit
d9ae886946
@ -11,6 +11,9 @@ let
|
|||||||
${concatStringsSep "\n" (map (s: "server ${s}") cfg.servers)}
|
${concatStringsSep "\n" (map (s: "server ${s}") cfg.servers)}
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pidFile = "/run/openntpd.pid";
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
###### interface
|
###### interface
|
||||||
@ -67,7 +70,11 @@ in
|
|||||||
wants = [ "network-online.target" "time-sync.target" ];
|
wants = [ "network-online.target" "time-sync.target" ];
|
||||||
before = [ "time-sync.target" ];
|
before = [ "time-sync.target" ];
|
||||||
after = [ "dnsmasq.service" "bind.service" "network-online.target" ];
|
after = [ "dnsmasq.service" "bind.service" "network-online.target" ];
|
||||||
serviceConfig.ExecStart = "${package}/sbin/ntpd -d -f ${cfgFile} ${cfg.extraOptions}";
|
serviceConfig = {
|
||||||
|
ExecStart = "${package}/sbin/ntpd -f ${cfgFile} -p ${pidFile} ${cfg.extraOptions}";
|
||||||
|
Type = "forking";
|
||||||
|
PIDFile = pidFile;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user