git.iko.soy/typeable/nixpkgs
on master help sign in
ssh module: ignore exit code when socket activated

sshd will at times fail when exiting. When socket activated, this will leave a number of sshd@ service instances in the failed state, so we simply ignore the error code if we are running socket activated. Recommended by upstream: http://systemd-devel.freedesktop.narkive.com/d0eapMCG/socket-activated-sshd-service-showing-up-as-a-failure-when-the-client-connection-fails Fixes: #3279

commitc4cba0e51f9db45b3faee55e8a5ed6d63c227f92 authorPeter Hoeg <peter@speartail.com> dateSun 19 Jun 2016, 17:19 (10 years ago) parentc5d9dc9
1 file changed+1
nixos/modules/services/networking/ssh/sshd.nix+1
nixos/modules/services/networking/ssh/sshd.nix+1
@@ -263,6 +263,7 @@ in
263263
264264 serviceConfig =
265265 { ExecStart =
266+ (optionalString cfg.startWhenNeeded "-") +
266267 "${cfgc.package}/bin/sshd " + (optionalString cfg.startWhenNeeded "-i ") +
267268 "-f ${pkgs.writeText "sshd_config" cfg.extraConfig}";
268269 KillMode = "process";