mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
syncthing: update systemd service config according to upstream example
The example service config were taken from the syncthing repo: https://github.com/syncthing/syncthing/blob/master/etc/linux-systemd/system/syncthing@.service
This commit is contained in:
parent
54e430a689
commit
9f191abad1
@ -54,12 +54,15 @@ in
|
|||||||
description = "Syncthing service";
|
description = "Syncthing service";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.STNORESTART = "placeholder"; # do not self-restart
|
environment.STNORESTART = "yes"; # do not self-restart
|
||||||
|
environment.STNOUPGRADE = "yes";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
Restart = "always";
|
Restart = "on-failure";
|
||||||
ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -home=${cfg.dataDir}";
|
ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -home=${cfg.dataDir}";
|
||||||
|
SuccessExitStatus = "2 3 4";
|
||||||
|
RestartForceExitStatus="3 4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user