nixos/sshd: add -D flag to prevent forking into a separate process (#122844)

It makes it easier for init-processes to monitor correct startup and liveness.
This commit is contained in:
gwitmond 2021-07-01 00:43:54 +02:00 committed by GitHub
parent debdcc9667
commit bbe66636f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -453,6 +453,7 @@ in
{ ExecStart =
(optionalString cfg.startWhenNeeded "-") +
"${cfgc.package}/bin/sshd " + (optionalString cfg.startWhenNeeded "-i ") +
"-D " + # don't detach into a daemon process
"-f /etc/ssh/sshd_config";
KillMode = "process";
} // (if cfg.startWhenNeeded then {