git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #9984 from grwlf/syncthing

syncthing: update systemd service config according to upstream example

commitee7e17c6a79d2d931debaa7ee24eef0a0cde6593 authorMatej Cotman <cotman.matej@gmail.com> dateSat 26 Sep 2015, 18:38 (11 years ago) parent3f27be89f191ab
1 file changed+5−2
nixos/modules/services/networking/syncthing.nix+5−2
nixos/modules/services/networking/syncthing.nix+5−2
@@ -54,12 +54,15 @@ in
5454 description = "Syncthing service";
5555 after = [ "network.target" ];
5656 wantedBy = [ "multi-user.target" ];
57− environment.STNORESTART = "placeholder"; # do not self-restart
57+ environment.STNORESTART = "yes"; # do not self-restart
58+ environment.STNOUPGRADE = "yes";
5859 serviceConfig = {
5960 User = "${cfg.user}";
6061 PermissionsStartOnly = true;
61− Restart = "always";
62+ Restart = "on-failure";
6263 ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -home=${cfg.dataDir}";
64+ SuccessExitStatus = "2 3 4";
65+ RestartForceExitStatus="3 4";
6366 };
6467 };
6568